RFR 9: 8165641 : Deprecate Object.finalize
Roger Riggs
Roger.Riggs at Oracle.com
Fri Mar 31 18:12:27 UTC 2017
Hi Stuart,
ok, will switch to @SuppressWarnings; it will avoid the deprecation
related clutter in the javadoc.
Thanks, Roger
On 3/31/2017 1:29 PM, Stuart Marks wrote:
>
>
> On 3/31/17 6:55 AM, Roger Riggs wrote:
>> The webrev for deprecating finalize has been updated:
>> - to improve the advice existing JDK subclasses overriding finalize
>> provides in
>> @deprecated javadoc,
>> - to expand Object.finalize() javadoc to reinforce the correct use of
>> super.finalize() by subclasses,
>> - and to remove redundant @SuppressWarnings annotations.
>>
>> Please review and comment.
>>
>> Webrev:
>> http://cr.openjdk.java.net/~rriggs/webrev-finalize-deprecate-8165641/
>>
>> Issue:
>> https://bugs.openjdk.java.net/browse/JDK-8165641
>
> Hi Roger,
>
> The main text in Object.finalize(), and the text for each of the
> occurrences of an overriding finalize() method, look good.
>
> I don't think j.l.Enum.finalize() needs to be deprecated. The main
> point of deprecating finalize() is to inform subclassers. But
> Enum.finalize() can't be overriden. I suppose somebody could *call* it
> from an enum, and deprecation would serve to generate a warning, but
> this is pretty obscure.
>
> I'd suggest replacing the deprecation of Enum.finalize() with
> @SuppressWarnings.
>
> s'marks
More information about the core-libs-dev
mailing list