-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b44
-
generic
-
generic
-
Verified
Name: viR10068 Date: 03/03/2004
The jdk1.5.0-b40 allows to use the annotation marked as
@Target(ElementType.TYPE) to annotate an annotation but
according to the spec (Final Draft Specification 2) the
@Target(ElementType.ANNOTATION_TYPE) should be used for it.
The affected new JCK 1.5 test is:
lang/ANNOT/annot049/annot04909m1/annot04909m1.html
The test source:
--------------------------- test.java -----------------------------------
import java.io.PrintStream;
import java.lang.annotation.*;
@Target(ElementType.TYPE) @interface iMark{}
@iMark @interface Annot {
int m();
}
-------------------------------------------------------------------------
Execution log (no errors):
% jdk1.5.0-b40/solaris-sparc/bin/javac -version -source 1.5 test.java
javac 1.5.0-beta2
%
======================================================================