RFR 9: 8165641 : Deprecate Object.finalize
Roger Riggs
Roger.Riggs at Oracle.com
Wed Mar 15 18:39:38 UTC 2017
Hi Mandy,
I re-checked and @deprecated is not inherited; and if it was it would
include a generic message from the super
so the @deprecated content is needed. Sample of
javax.imageio.stream.FileImageInputStream.[1]
Only minor cleanup to the webrev:
http://cr.openjdk.java.net/~rriggs/webrev-finalize-deprecate-8165641/
Thanks, Roger
[1]
http://cr.openjdk.java.net/~rriggs/finalize-doc/api/javax/imageio/stream/FileImageInputStream.html
On 3/14/2017 10:19 PM, Mandy Chung wrote:
>> On Mar 14, 2017, at 7:06 PM, Roger Riggs <roger.riggs at oracle.com> wrote:
>>
>> On 3/14/17 4:53 PM, Mandy Chung wrote:
>>> This patch looks fine in general.
>>>
>>> Does @inheritDoc inherit @deprecated? What does the javadoc of javax.imageio.stream.* look like?
>> Yes, the deprecation is inherited, see:
>>
>> http://cr.openjdk.java.net/~rriggs/finalize-doc/api/javax/imageio/stream/FileImageInputStream.html
>>
> If so, @deprecated is not needed in the method that does have {@inheritDoc} e.g. line 158-159, is it?
>
>
> 156 /**
> 157 * {@inheritDoc}
> 158 * @deprecated Finalization is deprecated and should not be used. See
> 159 * {@link Object#finalize} for the explanation and recommended replacement.
> 160 */
>
>
>>> + * @deprecated Finalization is deprecated and should not be used.
>>> + * See {@link Object#finalize} for the explanation and recommended replacement.
>>>
>>> Also, the second line is rather long and might be good to break into two lines?
>> The style guide allows a somewhat longer line. I moved the "See" to the previous line.
>> it didn't seem worth adding more vertical space for a couple of words.
> Maybe trim the spaces before {@link Object#finalize}.
>
> Mandy
>
More information about the core-libs-dev
mailing list