On Mon, 6 Jul 2026 23:36:05 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).

src/java.base/share/classes/java/lang/doc-files/ValueBased.html line 58:

> 56:         equal according to {@code ==};</li>
> 57:     <li>the class is final, and extends either {@code Object} or a 
> hierarchy of
> 58:         abstract classes.</li>

I was under the impression that supertypes of value calsses must be either 
abstract value classes or java.lang.Object?

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2631#discussion_r3596254730

Reply via email to