On Thu, 16 Jul 2026 17:08:04 GMT, Chen Liang <[email protected]> wrote:
>> `ValueBased` talks about constructor avoidance but does not specify the >> reason. It's better to include the reason because it's not straightforward >> from the fact that there's no binary incompatibility. >> >> Also `InvalidClassException` benefits from descriptions about >> strictly-initialized fields. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Chen Liang has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes brought in > by the merge/rebase. The pull request contains three additional commits since > the last revision: > > - Restructuring and rewording > - Merge branch 'lworld' of https://github.com/openjdk/valhalla into > doc/lw-vb-ctor-ice > - Minor ValueBased and InvalidClassException comments src/java.base/share/classes/java/lang/doc-files/ValueBased.html line 76: > 74: <p>When preview features are enabled, some value-based classes become > value classes. > 75: Instances of these classes become value objects, which have different > identity-related > 76: behaviors compared to identity objects, as described in {@link > Object}:</p> I don't want to treat Object as the Source of Truth here, maybe just delete "as desribed in Object:" and say "including:". src/java.base/share/classes/java/lang/doc-files/ValueBased.html line 82: > 80: longer distinguishable via {@code ==}. > 81: <li>The use of the value objects for synchronization or with > 82: {@linkplain java.lang.ref.Reference object references} result in > {@link IdentityException}. s/result/results/ ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2631#discussion_r3598342612 PR Review Comment: https://git.openjdk.org/valhalla/pull/2631#discussion_r3598346296
