United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4429536 (coll) WeakHashMap limitation: values refer to keys
JDK-4429536 : (coll) WeakHashMap limitation: values refer to keys

Details
Type:
Enhancement
Submit Date:
2001-03-23
Status:
Open
Updated Date:
2012-10-08
Project Name:
JDK
Resolved Date:
Component:
core-libs
OS:
generic
Sub-Component:
java.util:collections
CPU:
generic
Priority:
P4
Resolution:
Unresolved
Affected Versions:
1.3.0
Targeted Versions:

Related Reports
Relates:
Relates:
Relates:

Sub Tasks

Description

Name: boT120536			Date: 03/23/2001


java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)


The WeakHashMap is documented as having a minor defect. When values refer to
their own keys, the keys are strongly referenced, defeating the purpose of the
WeakHashMap. I have been burned by this on several occasions. I wasn't aware
that the values were indirectly referencing the keys.

Although the docs indicate that this defect might be fixed in a future release,
it would be nice if an official report was in the bug parade. I'd also like to
know if anyone has any ideas on how this defect can be fixed. I've been studing
the references API, and I can't see any solution.
(Review ID: 119340) 
======================================================================

                                    

Comments
EVALUATION

This will be fixed if/when 4630118 is fixed.  -- ###@###.### 2002/12/16
                                     
182-10-12 0



Hardware and Software, Engineered to Work Together