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 - WeakSet can throw IndexOutOfBoundsExceptions.
Summary: WeakSet can throw IndexOutOfBoundsExceptions.
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P4 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-10-16 00:21 UTC by Jesse Glick
Modified: 2008-12-23 10:39 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 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.