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

(ref) Reference object should not support cloning

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b13

      Backports

        Description

        Reference objects cannot be meaningfully cloned. For example when cloning a WeakReference object that is pending for enqueuing, what state should the cloned reference object be? Should the referent of the newly cloned reference be considered as a strongly reference?

        A new Reference object can be created via its constructor and a newly reference object has no relationship with any existing reference objects with the same referent.

        This proposes not to support cloning of Reference object.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                mchung Mandy Chung
                Reporter:
                mchung Mandy Chung
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: