On Fri, 17 Jul 2026 06:57:04 GMT, Jaikiran Pai <[email protected]> wrote:

>> Some final polishing to align javadocs with the JEP.
>> 
>> - Main goal is to remove usage of "statewise equivalent", as noted in the 
>> title
>> - A little bit of general editing in the Object intro, `equals` method, and 
>> `clone` method
>> - Corrected "the finalize method of a value ~class~ _object_ will never be 
>> invoked"
>> 
>> ---------
>> - [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/Object.java line 51:
> 
>> 49:  *          to be thrown.
>> 50:  *          <p>
>> 51:  *          The {@link #finalize()} method of a value object will never 
>> be invoked by
> 
> Hello Dan, I think changing this from value class to value object will be 
> confusing. The Object.finalize() method specification (and implementation) 
> continues to state:
> 
>> The {@code finalize} method of a value class is never directly invoked by 
>> the garbage collector. This includes the case where an abstract value class 
>> declares a {@code finalize} method and the class is extended by an identity 
>> class;
> 
> So it's not just value objects whose finalize don't get invoked but even 
> identity objects whose super class is a value class with the finalize method.

Ah, thanks, I noted that in the comments of JDK-8388161. I'll revert this, 
let's handle it there.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2651#discussion_r3604094159

Reply via email to