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.

Bug 43929 - IOExceptions from ClassFile class
Summary: IOExceptions from ClassFile class
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Classfile (show other bugs)
Version: 4.x
Hardware: PC All
: P1 blocker (vote)
Assignee: _ tball
URL:
Keywords:
: 43933 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-05-27 15:08 UTC by Pavel Flaska
Modified: 2006-03-24 09:56 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exceptions (2.66 KB, text/plain)
2004-05-27 15:09 UTC, Pavel Flaska
Details
exceptions after opening the 1.5 project (30.23 KB, text/plain)
2004-05-27 17:54 UTC, Jan Pokorsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Flaska 2004-05-27 15:08:19 UTC
I tried to scan rt.jar from JDK 1.5 in our
refactoring build to create name index. I have got
the IOExceptions.
Comment 1 Pavel Flaska 2004-05-27 15:09:15 UTC
Created attachment 15319 [details]
Exceptions
Comment 2 Pavel Flaska 2004-05-27 15:13:48 UTC
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)
Comment 3 _ tball 2004-05-27 16:27:51 UTC
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...
Comment 4 Tomas Hurka 2004-05-27 16:34:21 UTC
*** Issue 43933 has been marked as a duplicate of this issue. ***
Comment 5 Tomas Hurka 2004-05-27 16:35:40 UTC
Priority changed to P1, since duplicated issue #43933 is P1.
Comment 6 _ tball 2004-05-27 17:09:28 UTC
Fixed loading of annotations with array element values.
Comment 7 Jan Pokorsky 2004-05-27 17:53:19 UTC
Still broken -> reopened.
Comment 8 Jan Pokorsky 2004-05-27 17:54:20 UTC
Created attachment 15327 [details]
exceptions after opening the 1.5 project
Comment 9 Pavel Flaska 2004-05-27 18:52:03 UTC
I saw the name java.lang.annotation.Inherited when I met the CCE in
Annotation.java.
Comment 10 _ tball 2004-05-27 23:58:10 UTC
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.
Comment 11 psuk 2004-05-28 09:30:38 UTC
Reopening.
Doesn't work on J2SE 1.5 Beta 2.
Is the bug filed against JDK?

Comment 12 Pavel Flaska 2004-05-28 09:36:41 UTC
Reproducible with jdk1.5.0-b51, jdk1.5.0-b51a.
Cannot reproduce with jdk1.5.0-b49 and jdk1.5.0-b50.
Comment 13 _ tball 2004-05-28 17:14:39 UTC
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.
Comment 14 Martin Matula 2004-05-28 18:27:17 UTC
Verified with JDK 1.5 build 49 and 51 (beta 2).