[lworld] RFR: 8287241: Add IdentityException to report that a value object is not valid [v2]

Mandy Chung mchung at openjdk.java.net
Wed Jun 8 21:42:05 UTC 2022


On Wed, 8 Jun 2022 21:33:34 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> 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.

okay.  thanks

-------------

PR: https://git.openjdk.java.net/valhalla/pull/696



More information about the valhalla-dev mailing list