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 86: > 84: * A {@code null} reference is only {@code ==} to itself, and > attempts > 85: * to use it in an {@code equals} test will typically throw a > 86: * {@code NullPointerException}. The {@link > java.util.Objects#equals} This part is a bit confusing to word, e.g. `"foo".equals(null)` will return false. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/34140#discussion_r4785178582
