On Fri, 31 Jul 2026 16:15:44 GMT, Joe Darcy <[email protected]> wrote:

>> src/java.base/share/classes/java/lang/Double.java line 181:
>> 
>>> 179:  * is distinguished from every other bit pattern encoding a NaN.
>>> 180:  * Note this is the notion of equivalence used when {@linkplain
>>> 181:  * Object#equals(Object) comparing value objects for equality}.
>> 
>> The link to Object::equals is misleading: Only its implementation 
>> specification briefly mentions "indistinguishable value objects". I think we 
>> can just remove the link and keep the text.
>
> My goal here is to link to some broader discussion of equality of value 
> objects since "indistinguishable" has been introduced as a term to describe 
> their semantics. Object.equals is one candidate for that. I've looked at the 
> "Value-based Classes" page and that doesn't have a concentrated discussion of 
> how value object comparison is done.

`Object::equals` talks about how the method should be implemented; it has 
little to no discussion about the "indistinguisable" rules of value objects, 
which is the focus of this excerpt.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32114#discussion_r3691842611

Reply via email to