On Fri, 14 Aug 2026 21:53:30 GMT, Vicente Romero <[email protected]> wrote:

>> After this PR value classes that override method Object::finalize will get a 
>> compiler error instead of a warning
>> 
>> TIA
>> 
>> ---------
>> - [X] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Vicente Romero has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Object API

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

> 600:      *      <div class="preview-comment">
> 601:      *          It is illegal for a value class, abstract or concrete, 
> to declare
> 602:      *          a {@code finalize} method.

The class description has "The finalize method of a value class will never be 
invoked by the garbage collector". Will this be removed or updated?

For the method description, shouldn't it be clear that its the Java Language 
that does not allow a value class to declare a finalize method?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32355#discussion_r3788927785

Reply via email to