On Mon, 17 Aug 2026 15:59:09 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:
> 
>   addressing review comments

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

> 596:      * <div class="preview-block">
> 597:      *      <div class="preview-comment">
> 598:      *          Value class, abstract or concrete, cannot have {@code 
> finalize} methods.

Nit - should this instead say `... cannot have the {@code finalize} method.`?

src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
 line 4391:

> 4389: 
> 4390: compiler.err.value.finalize=\
> 4391:     value classes cannot have finalize methods

Same here, should it be "value classes cannot have a finalize method"?

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

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

Reply via email to