Community
Participate
Working Groups
A field declaration is allowed inside an annotation type declaration iff it is a constant field declaration (i.e. it has an initializer with a constant value). @interface I { int[] tab; } error: needs an initializer: @interface I { int[] tab = {1, 2}; } compiles fine.
Note that javac accepts: int[] tab = {1, "aaa".length() }
Added support for checking annotation fields. Added regression test: AnnotationTest#test039-043. Fixed
Verified in 200412140800