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

(ref) Add new class java.lang.ref.StrongReference

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P5
    • Resolution: Duplicate
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_10

      Description

      A DESCRIPTION OF THE REQUEST :
      For a more symetrical treatment of objects whose reference types need to be changed, it would be useful to have a StrongReference class to eliminate if statements to access such objects.

      JUSTIFICATION :
      Suppose I have a connection pool. Once a connection is captured from the pool, I change it's reference from strong to soft. As I iterate through the collection of connection in the pool, I need to keep testing for object type. If there was a StrongReference class, I could always treat the object as a Reference, and get its value through the get() method.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      StrongReference simply wraps an object so it can be treated as any other reference class.
      ACTUAL -
      No such class exists.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mr Mark Reinhold
              Reporter:
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: