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 4539

Summary: WeakSet can throw IndexOutOfBoundsExceptions.
Product: platform Reporter: Jesse Glick <jglick>
Component: -- Other --Assignee: Jesse Glick <jglick>
Status: CLOSED FIXED    
Severity: normal    
Priority: P4    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Jesse Glick 1999-10-16 00:21:29 UTC
Thrown from line 312, object2Entry:

 Entry e = entries[hash];

occasionally gives ArrayIndexOutOfBoundsException: -68 or somesuch. Looks like some objects have negative hashCode()s (but not usually??), and hashIt() does not check for this--note that the modulus w
ill return a *negative* value if the hashCode() is negative. To fix, it should be enough to take absolute value of the hashCode or something.
Comment 1 Marek Grummich 2000-07-25 09:26:59 UTC
Priority is changed to P4 (normal).
Comment 2 Quality Engineering 2003-07-02 15:23:14 UTC
Resolved for 3.4.x or earlier, no new info since then -> verify.

Comment 3 Quality Engineering 2003-07-02 15:41:12 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.