JDK1.5 - More painful bugs aka Enumeration-Woes: Solved!
Current Status: Solved
Defect:
When more than one annotation type files are compiled in javac(any of the ways like *.java or @srclist or FileName1.java FileName2.java)
then it emits and error message that it cannot find symbol for statically imported Enums.
However statically importing one level up and de-referencing works.
Create two classes in the same directory as shown below to check the defect.
Just having any one of these files in the compilation list works fine. However more than one causes javac to croak!
//// Simple.java
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
@Target (METHOD)
public @interface Simple {
String value();
}
//// Simple2.java
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
@Target (TYPE)
public @interface Simple2 {
String value();
}
Filed under Java Software |
|
RSS 2.0 |
Trackback this Article
|
Email this Article
You may also like to read |





































April 21st, 2005 at 6:20 am
i love java so much that i dont what to with my self. i would be very greateful if u allowed me to downloads your jdk1.5.
thanx
April 22nd, 2005 at 2:22 pm
@Salu
You can download JDK 1.5 from Sun site - http://java.sun.com/j2se/1.5.0/download.jsp
June 25th, 2007 at 5:53 pm
hallo gdrmmg