Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4429536

(coll) WeakHashMap limitation: values refer to keys

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      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)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mr Mark Reinhold
                Reporter:
                bonealsunw Bret O'neal (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: