On Wed, 2 Dec 2026 22:52:12 GMT, Dan Smith <[email protected]> wrote:

>> The primary enhancement here is a more fleshed-out discussion about value 
>> objects, and particularly their interaction with `==`, in the 
>> `java.lang.Object` javadoc.
>> 
>> Then I've done some cleanup of links, directing discussion about "value 
>> objects" to `Object##value-objects`, "indistinguishable" to 
>> `Object##comparing-objects`. In some situations, it's more appropriate to 
>> link "has identity" to `Objects##hasIdentity` and "value class" to 
>> `Class#isValue`, but I've reduced reliance on those.
>> 
>> Browsable docs build here: 
>> https://cr.openjdk.org/~dlsmith/8389875/8389875-20261130/api/index.html
>> 
>> (Timeline note: this is a doc-only fix, I'm not worried about getting it 
>> integrated before the Dec 3 rampdown deadline.)
>> 
>> ---------
>> - [X] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Dan Smith has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Saying more about "identity" and creation events

src/java.base/share/classes/java/lang/Object.java line 60:

> 58:  *          <p>
> 59:  *          As specified by JLS {@jls value-objects-15.21.3}, the {@code 
> ==}
> 60:  *          operator tests that objects are 
> <em>indistinguishable</em>&mdash;that

indistiguishable -> indistinguishable

src/java.base/share/classes/java/lang/Object.java line 174:

> 172:      * {@code y}, this method returns {@code true} if and only
> 173:      * if {@code x} and {@code y} refer to the same identity object or
> 174:      * <a id=equalsIndistinguishable>indistinguishable value objects 
> ({@code x == y} has the value

Can you check for links to this from other classes, there is at least one in 
Double.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/34140#discussion_r4785128610
PR Review Comment: https://git.openjdk.org/jdk/pull/34140#discussion_r4785137146

Reply via email to