[lworld] RFR: 8287241: Add IdentityException to report that a value object is not valid [v2]
Roger Riggs
rriggs at openjdk.java.net
Wed Jun 8 21:36:54 UTC 2022
On Wed, 8 Jun 2022 21:20:55 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add Objects.requireIdentity(obj, Supplier<String> supplier);
>> update copyright
>
> src/java.base/share/classes/java/util/Objects.java line 206:
>
>> 204: Objects.requireNonNull(obj);
>> 205: var cl = obj.getClass();
>> 206: if (cl.isValue())
>
> Suggestion:
>
> if (obj.getClass().isValue())
>
>
> Same as the implementation of other variants of the `requireIdentity` method.
`cl` is used to throw the IdentityException in the following line.
-------------
PR: https://git.openjdk.java.net/valhalla/pull/696
More information about the valhalla-dev
mailing list