JDK-8201793 : (ref) Reference object should not support cloning
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-04-18
  • Updated: 2022-08-22
  • Resolved: 2018-05-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 8
11 b13Fixed 8u351Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8203660 :  
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.
Comments
JDK 8u Fix Request: This fix is required for compliance with Java SE 8 Maintenance Release 4: https://jcp.org/en/jsr/detail?id=337
15-08-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk8u-dev/pull/102 Date: 2022-08-15 16:42:06 +0000
15-08-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk8u-ri/pull/6 Date: 2022-04-20 00:59:26 +0000
20-04-2022

URL: http://hg.openjdk.java.net/jdk/jdk/rev/e3653598e3b0 User: mchung Date: 2018-05-03 18:18:41 +0000
03-05-2018