[jdk8u-ri] RFR: 8201793: (ref) Reference object should not support cloning
Mandy Chung
mchung at openjdk.java.net
Thu Apr 21 20:33:40 UTC 2022
On Wed, 20 Apr 2022 00:59:26 GMT, Poonam Bajaj <poonam at openjdk.org> wrote:
> This changeset backports the fix for 8201793 to jdk8u-ri.
>
> With this change, `java.lang.ref.Reference::clone` method always throws `CloneNotSupportedException`.
jdk/src/share/classes/java/lang/ref/Reference.java line 255:
> 253: * @throws CloneNotSupportedException always
> 254: *
> 255: * @since 8
This method is only present in JDK 8u42 (RI) and 8u352 and later releases. It's not in existing 8u releases >= 8u45 and < 8u352. Neither 8 or 8u42 would cause confusion. A suggestion is to use `@apiNote` to indicate which MR this method is defined:
@apiNote This method is defined in Java SE 8 Maintenance Release 4.
-------------
PR: https://git.openjdk.java.net/jdk8u-ri/pull/6
More information about the jdk8u-dev
mailing list