Skip to content

STC: NullPointerException for raw type guard followed by parameterized method call #1349

@mauromol

Description

@mauromol

Using Greclipse 4.5.0.v202203070924-e2112.
Using Groovy 2.5.16 in my project build path.

One of my projects has started to fail Groovy compilation within Eclipse with this error:

Groovy: compiler error: exception in phase 'instruction selection' in source unit 
 '/home/mauro/svn/myproject/mysubproject/src/main/groovy/it/dcssrl/fatturapa/web/invio/ui/common/validation/UiValidationUtils.
 groovy' unexpected NullPointerException

On the groovy console I find this:

   Code select : 18:02:52 Code select on UiValidationUtils.groovy at [ 502,0 ]
   Code select : 18:02:52 Event complete: 1ms: Code select: UiValidationUtils.groovy
AST Transforms : 18:02:52 Global transform org.codehaus.groovy.ast.builder.AstBuilderTransformation applied to UiValidationUtils.groovy in 0ms
      Compiler : 18:02:52 exception in phase 'instruction selection' in source unit '/home/mauro/svn/myproject/mysubproject/src/main/groovy/it/dcssrl/fatturapa/web/invio/ui/common/validation/UiValidationUtils.groovy' unexpected NullPointerException
      Compiler : 18:02:52 /home/mauro/svn/myproject/mysubproject/src/main/groovy/it/dcssrl/fatturapa/web/invio/ui/common/validation/UiValidationUtils.groovy: 1:  compiler error: exception in phase 'instruction selection' in source unit '/home/mauro/svn/myproject/mysubproject/src/main/groovy/it/dcssrl/fatturapa/web/invio/ui/common/validation/UiValidationUtils.groovy' unexpected NullPointerException @ line 1, column 1.
   package it.dcssrl.fatturapa.web.invio.ui.common.validation
   ^
AST Transforms : 18:02:54 Global transform groovy.grape.GrabAnnotationTransformation applied to UiValidationUtils.groovy in 0ms
AST Transforms : 18:02:54 Global transform org.codehaus.groovy.ast.builder.AstBuilderTransformation applied to UiValidationUtils.groovy in 0ms
      Compiler : 18:02:54 exception in phase 'instruction selection' in source unit '/home/mauro/svn/myproject/mysubproject/src/main/groovy/it/dcssrl/fatturapa/web/invio/ui/common/validation/UiValidationUtils.groovy' unexpected NullPointerException
      Compiler : 18:02:54 /home/mauro/svn/myproject/mysubproject/src/main/groovy/it/dcssrl/fatturapa/web/invio/ui/common/validation/UiValidationUtils.groovy: 1:  compiler error: exception in phase 'instruction selection' in source unit '/home/mauro/svn/myproject/mysubproject/src/main/groovy/it/dcssrl/fatturapa/web/invio/ui/common/validation/UiValidationUtils.groovy' unexpected NullPointerException @ line 1, column 1.
   package it.dcssrl.fatturapa.web.invio.ui.common.validation
   ^

This is a huge proprietary project, so I have no idea on how to cut it down. Is there something I can share with you to understand what's wrong? Maybe the contents of the affected class?

It seems like removing @CompileStatic from this class and issue a full project rebuild fixes the error.

This same project compiles fine with Gradle.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions