RFD: java.util.jar.Manifest.make72Safe has an invalid @deprecation tag

Jaikiran Pai jai.forums2013 at gmail.com
Thu Feb 29 12:38:48 UTC 2024


Hello Eirik,

I think that method (and its references in some test code comments) can 
be removed. Like you note it's a package private method within the 
java.util.jar package and I don't see its usage (other than test code 
comments) anywhere within the JDK repo. That @Deprecated annotation on 
that method seems to have been introduced as part of 
https://bugs.openjdk.org/browse/JDK-8066619 (review thread 
https://mail.openjdk.org/pipermail/core-libs-dev/2018-December/057030.html). 
I'm guessing it likely was an oversight to have added that annotation to 
an internal method instead of just removing its usage.

-Jaikiran

On 29/02/24 3:09 am, Eirik Bjørsnøs wrote:
> Hi,
>
> The non-public method java.util.jar.Manifest.make72Safe is marked 
> @Deprecated(since="13").
>
> However, the Javadoc comment has a '@deprecation' tag which presumably 
> should have been `@deprecated`.
>
> I first thought of proposing a PR to fix the invalid tag, but then I 
> noticed that the method is non-public and has no callers in OpenJDK.
>
> Not sure I understand why this internal method was marked deprecated 
> in the first place and not simply removed? Are we worried about people 
> calling this reflectively?
>
> What would be the best way to go about this?
>
> (a) Do nothing
> (b) Just fix the tag @deprecation -> @deprecated
> (c) Fix the tag, add forRemoval=true
> (d) Just delete the method altogether (it's internal after all).
>
> Cheers,
> Eirik.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20240229/7d0af223/attachment.htm>


More information about the core-libs-dev mailing list