[jdk8u-ri] RFR: 8201793: (ref) Reference object should not support cloning
Iris Clark
iris at openjdk.java.net
Thu Apr 21 21:19:38 UTC 2022
On Thu, 21 Apr 2022 20:29:49 GMT, Mandy Chung <mchung 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.
The proposed `@apinote` looks good.
-------------
PR: https://git.openjdk.java.net/jdk8u-ri/pull/6
More information about the jdk8u-dev
mailing list