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)