This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I tried to scan rt.jar from JDK 1.5 in our refactoring build to create name index. I have got the IOExceptions.
Created attachment 15319 [details] Exceptions
I did some observation and seems that the problem is in Annotation class. Seems that original exception is CCE: java.lang.ClassCastException: org.netbeans.modules.classfile.CPUTF8Info at org.netbeans.modules.classfile.Annotation.<init>(Annotation.java:58) at org.netbeans.modules.classfile.Annotation.load(Annotation.java:51) at org.netbeans.modules.classfile.ClassFile.loadAttributes(ClassFile.java:226) at org.netbeans.modules.classfile.ClassFile.load(ClassFile.java:148) at org.netbeans.modules.classfile.ClassFile.<init>(ClassFile.java:107)
Problem is due to error when loading an annotation type that defines an array of possible values, such as java.lang.annotation.RetentionType. Fix in progress...
*** Issue 43933 has been marked as a duplicate of this issue. ***
Priority changed to P1, since duplicated issue #43933 is P1.
Fixed loading of annotations with array element values.
Still broken -> reopened.
Created attachment 15327 [details] exceptions after opening the 1.5 project
I saw the name java.lang.annotation.Inherited when I met the CCE in Annotation.java.
The JDK 1.5 beta 1 had classfiles in its jce.jar file with corrupted EnclosingMethod attributes. This may have been due to that jar file being obscurated with DashO, or a compiler bug since fixed. In any event, the classfile module now recovers more gracefully from these bad files. I am able to bring up the latest build using JDK 1.4.2, 1.5 beta 1, and 1.5 build 49.
Reopening. Doesn't work on J2SE 1.5 Beta 2. Is the bug filed against JDK?
Reproducible with jdk1.5.0-b51, jdk1.5.0-b51a. Cannot reproduce with jdk1.5.0-b49 and jdk1.5.0-b50.
It appears that the classfile format has again changed as of build 51: annotation types are now a UTF8 instead of a Class constant pool entry. The annotation attribute loader now tests for both types and loads appropriately for that type.
Verified with JDK 1.5 build 49 and 51 (beta 2).