making it defensive as I'm seeing the following stack trace while using this script:
java.lang.NullPointerException at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.checkCall(PojoMetaClassSite.java:54) at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at dsld.IntelliJ$_run_closure1.doCall(IntelliJ.gdsl:15) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) at dsld.IntelliJ$_run_closure1.doCall(IntelliJ.gdsl) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at org.jetbrains.plugins.groovy.dsl.GroovyDslExecutor$_processVariants_closure16.doCall(GroovyDslExecutor.groovy:168) at sun.reflect.GeneratedMethodAccessor290.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) at org.jetbrains.plugins.groovy.dsl.GroovyDslExecutor$_processVariants_closure16.doCall(GroovyDslExecutor.groovy) at sun.reflect.GeneratedMethodAccessor289.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.Closure.call(Closure.java:412) at groovy.lang.Closure.call(Closure.java:406) at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:118) at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:257) at org.codehaus.groovy.runtime.DefaultGroovyMethods.use(DefaultGroovyMethods.java:440) at org.codehaus.groovy.runtime.dgm$883.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:308) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145) at org.jetbrains.plugins.groovy.dsl.GroovyDslExecutor.processVariants(GroovyDslExecutor.groovy:167) at org.jetbrains.plugins.groovy.dsl.GroovyDslScript.addGdslMembers(GroovyDslScript.java:90) at org.jetbrains.plugins.groovy.dsl.GroovyDslScript.processExecutor(GroovyDslScript.java:69) at org.jetbrains.plugins.groovy.dsl.GroovyDslFileIndex.processExecutors(GroovyDslFileIndex.java:248) at org.jetbrains.plugins.groovy.lang.resolve.NonCodeMembersContributor.runContributors(NonCodeMembersContributor.java:108) at org.jetbrains.plugins.groovy.lang.resolve.ResolveUtil.processNonCodeMembers(ResolveUtil.java:197) at org.jetbrains.plugins.groovy.lang.resolve.ResolveUtil.processNonCodeMembers(ResolveUtil.java:187) at org.jetbrains.plugins.groovy.lang.resolve.ResolveUtil.treeWalkUp(ResolveUtil.java:114) at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceResolveUtil.resolveImpl(GrReferenceResolveUtil.java:44) at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl.resolveMethodOrProperty(GrReferenceExpressionImpl.java:240) at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl.doPolyResolve(GrReferenceExpressionImpl.java:654) at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl.access$100(GrReferenceExpressionImpl.java:73) at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl$3.resolve(GrReferenceExpressionImpl.java:459) at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl$3.resolve(GrReferenceExpressionImpl.java:457) at com.intellij.psi.impl.source.resolve.ResolveCache$2.compute(ResolveCache.java:129) at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:106) at com.intellij.psi.impl.source.resolve.ResolveCache.a(ResolveCache.java:134) at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:145) at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl.advancedResolve(GrReferenceExpressionImpl.java:763) at org.jetbrains.plugins.groovy.annotator.GroovyAnnotator.visitReferenceExpression(GroovyAnnotator.java:187) at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl.accept(GrReferenceExpressionImpl.java:346) at org.jetbrains.plugins.groovy.annotator.GroovyAnnotator.annotate(GroovyAnnotator.java:128) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:157) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:100) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$8.run(GeneralHighlightingPass.java:595) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:773) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$3600(GeneralHighlightingPass.java:80) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$10.run(GeneralHighlightingPass.java:779) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:84) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:776) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$3600(GeneralHighlightingPass.java:80) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$10.run(GeneralHighlightingPass.java:779) at com.intellij.codeInsight.daemon.impl.RefCountHolder.analyze(RefCountHolder.java:250) at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.analyze(HighlightVisitorImpl.java:135) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:776) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:641) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:203) at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:58) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:61) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:350) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1049) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:342) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:218) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:340) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:316) at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:134) at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:131) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31) at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70) at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:113) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
Loading
Please register or sign in to comment