Community
Participate
Working Groups
The modifiers for an annotation type member declaration are the same than for an abstract method. Only abstract and public are allowed. protected, private, transient, volatile, native are not allowed.
Here is a test case: @interface X { native int id() default 0; } replace native with all modifiers above and they should fail.
Cannot reproduce with batch compiler.
The right test case is for a field declaration for an annotation type declaration. @interface X { protected int c = 1; }
Added support. Regression test: AnnotationTest#test044. Fixed
Verified in 200412140800