[lworld] RFR: 8294312: [lworld] Add java.util.Objects.isIdentityObject [v2]

Roger Riggs rriggs at openjdk.org
Thu Sep 29 21:43:42 UTC 2022


On Thu, 29 Sep 2022 21:18:14 GMT, Mandy Chung <mchung at openjdk.org> wrote:

>> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review comment updates related to ValhallaFeatures.isEnabled().
>>   And javadoc cleanup
>
> src/java.base/share/classes/java/lang/Class.java line 645:
> 
>> 643:      * @since Valhalla
>> 644:      */
>> 645:     public boolean isIdentity() {
> 
> The javadoc for `isIdentity` should specify if this Class is an array class, primitive type or `void`.

The primitive classes and void also do not have specified modifier bits.
At present, they are not reported to be identity or value classes. The mainline javadoc says they are "value classes" but in reality they are identity classes. JEP 204 (future) would be the authority on that.

> src/java.base/share/classes/java/util/Objects.java line 194:
> 
>> 192: 
>> 193:    /**
>> 194:     * {@return {@code true} if the object is an identity object, otherwise {@code false}}
> 
> nit: s/the object/the specified object/

The pattern in all of Objects.java is to refer to "the object".

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

PR: https://git.openjdk.org/valhalla/pull/770



More information about the valhalla-dev mailing list