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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 5.0
    • core-libs
    • sparc
    • solaris_10

      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: