On Sat, 15 Aug 2026 08:08:12 GMT, Alan Bateman <[email protected]> wrote:
>> 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?
I have removed the text in the class description, regarding clarifying in the
method description that the Java Language is the one that does not allow value
classes to declare the method, well there is not such reference in the
`finalize` method of `Enum` class. I guess that if we use `Enum` as a precedent
then probably there shouldn't be an explicit reference to the JLS?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32355#discussion_r3797043113