Bug 79663 - [1.5][annot] Modifiers for field declaration must be public in an annotation type declaration
Summary: [1.5][annot] Modifiers for field declaration must be public in an annotation...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-29 10:34 EST by Olivier Thomann CLA
Modified: 2004-12-14 17:50 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2004-11-29 10:34:52 EST
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.
Comment 1 Olivier Thomann CLA 2004-11-29 10:35:24 EST
Here is a test case:
@interface X {
	native int id() default 0;
}

replace native with all modifiers above and they should fail.
Comment 2 Philipe Mulet CLA 2004-11-29 11:49:28 EST
Cannot reproduce with batch compiler.
Comment 3 Olivier Thomann CLA 2004-11-29 11:59:44 EST
The right test case is for a field declaration for an annotation type declaration.

@interface X {
	protected int c = 1;
}
Comment 4 Philipe Mulet CLA 2004-11-29 13:06:17 EST
Added support. Regression test: AnnotationTest#test044.
Fixed
Comment 5 Olivier Thomann CLA 2004-12-14 17:50:25 EST
Verified in 200412140800