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

Lance Andersen lance.andersen at oracle.com
Thu Feb 29 19:31:50 UTC 2024


Hi Eirik,

I also be we should be OK to remove.  That being said, as part of the change, we should update open/test/jdk/sun/security/tools/jarsigner/PreserveRawManifestEntryAndDigest.java
Best
Lance

On Feb 29, 2024, at 7:38 AM, Jaikiran Pai <jai.forums2013 at gmail.com> wrote:


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.


[oracle_sig_logo.gif]






Lance Andersen | Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
Lance.Andersen at oracle.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20240229/f2954082/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oracle_sig_logo.gif
Type: image/gif
Size: 658 bytes
Desc: oracle_sig_logo.gif
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20240229/f2954082/oracle_sig_logo-0001.gif>


More information about the core-libs-dev mailing list