Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.4
-
None
-
jdk 1.6.0_18
Description
Annotation properties of array type are generated with null walue in java stubs. Subsequently, stub compilation fail.
For example :
// ArrayAnnotation.java public @interface ArrayAnnotation { String[] value() default {}; } // AnnotatedClass.groovy @ArrayAnnotation(["foo", "bar"]) class AnnotatedClass { }
generates the stub :
@ArrayAnnotation(value=null) public class AnnotatedClass extends java.lang.Object implements groovy.lang.GroovyObject { // irrelevent stuff removed }
Compilation fails with the message :
Compilation failure: \...\target\generated-sources\groovy-stubs\main\groovystubs\AnnotatedClass.java:[4,23] attribute value must be constant