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

(ref) Add getReference() to java.lang.ref.Reference

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Won't Fix
    • P4
    • None
    • 1.4.0
    • core-libs
    • x86
    • windows_2000

    Description



      Name: jl125535 Date: 01/28/2002


      FULL PRODUCT VERSION :
      java version "1.3.1_02"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
      Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      The java.lang.ref.Reference class should have a method:
      public Object getReference() {
         return get();
      }

      so that it can be used within java-bean compliant
      environments such as Struts and other tag libraries that
      only allow access to properties defined as regular java bean
      properties.
      For instance, if there were a tag library <bean:write>
      that took a name and an attribute parameter, and printed out
      the value, then it would not be possible to print out a
      value of a reference, since it wouldn't return the correct
      value, eg:
      <bean:write name="referenceObject" attribute="reference" />
      wouldn't work because get is not a java-bean attribute.

      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public Object getReference() {
         return get();
      }

      ---------- END SOURCE ----------

      CUSTOMER WORKAROUND :
      Create a java bean descriptor for Reference that declares
      reference as an attribute and gives get() as the method to call.
      (Review ID: 138781)
      ======================================================================

      Attachments

        Activity

          People

            mchung Mandy Chung
            jleesunw Jon Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: