On Fri, 10 Jul 2026 17:35:03 GMT, Joe Darcy <[email protected]> wrote:

>> The specification of `Objects#hasIdentity(Object)`, which is being linked 
>> here from the throws clause, states:
>> 
>>> <p>This method returns {@code false} if and only if the parameter is {@code 
>>> null} or ...
>> 
>> So I think it implicitly covers the `null` part and this throws clause 
>> description maybe OK in its current form.
>> 
>> This is similar to what I accepted for a different review here 
>> https://git.openjdk.org/jdk/pull/31123#discussion_r3557680258
>
> Hmm. We'll see what the fix for  JDK-8386811 is like.
> 
> The preview block for this constructor states "The referent must have 
> identity", which would exclude `null` per the definition in 
> `Objects.hasIdentity`.

I wonder if it makes sense to define it in terms of "non-value object" or in 
terms of "null or identity".

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31123#discussion_r3569998287

Reply via email to