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 58855 - NegativeArraySizeException from JavaNode.StateUpdater
Summary: NegativeArraySizeException from JavaNode.StateUpdater
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All Linux
: P2 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-13 09:07 UTC by ehucka
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ehucka 2005-05-13 09:07:01 UTC
After some 'common' actions like Open source, Save source etc. is thrown exception:

java.lang.NegativeArraySizeException
        at java.util.ArrayList.<init>(ArrayList.java:135)
        at org.netbeans.modules.java.JavaNode$StateUpdater.run(JavaNode.java:776)
        at org.openide.util.Task.run(Task.java:207)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:419)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:794)
Comment 1 Jan Pokorsky 2005-05-13 10:56:05 UTC
It looks it is impossible to synchronize WeakSet properly.
Comment 2 Jan Pokorsky 2005-05-13 11:12:24 UTC
WeakSet replaced with HashMap. It is not necessary to use weak references here
and it looks it is impossible to synchronize WeakSet properly since GC accesses
the set out of our control.

Fixed in

/cvs/java/src/org/netbeans/modules/java/JavaNode.java,v  <--  JavaNode.java
new revision: 1.130; previous revision: 1.129
Comment 3 ehucka 2005-07-12 10:24:56 UTC
verified