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

RFE: java.lang.ref.StrongReference

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      A DESCRIPTION OF THE REQUEST :
      It would occasionally be useful to create a collection of strong and weak references that can be operated on interchangeably. This is not possible because there is no StrongReference counterpart to java.lang.ref.WeakReference.

      JUSTIFICATION :
      This enhancement would eliminate the need to introduce additional classes to abstract the difference between WeakReference and an ordinary strong reference. In other words, instead of Collection<Foo> containing instances of StrongFoo and WeakFoo, one could simply use a Collection<Reference>.

      The fact that this is not a very common or compelling need is offset by the fact that introducing StrongReference would likely be trivial.


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: