Description
Name: rmT116609 Date: 02/09/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)
A DESCRIPTION OF THE PROBLEM :
The metadata-1_0-prd-spec/metadata-public-draft.html document allows "AnnotationTypeMemberDeclaration" to contain a "ConstantDeclaration", but the following code will not compile.
(is this is what is ment by ConstantDeclaration?)
public @interface Annot1 {
String value();
int CONSTANT = 3;
}
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Annot1.java:5: an @interface may not contain a field
int CONSTANT = 3;
^
1 error
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package foo.metadata;
public @interface Annot1 {
String value();
int CONSTANT = 3;
}
---------- END SOURCE ----------
(Incident Review ID: 238049)
======================================================================
Attachments
Issue Links
- duplicates
-
JDK-4981309 bring jsr175 implementation up to date with Public Draft
- Resolved