-
CSR
-
Resolution: Approved
-
P3
-
None
-
source, behavioral
-
low
-
These classes were deprecated in JDK 9. No evidence of actual usage of these APIs so the compatibility impact is likely very low
-
Java API, add/remove/modify command line option
-
JDK
Summary
Terminally deprecate (add `forRemoval=true) the following JDK-specific APIs, these APIs have been deprecated since JDK 9.
com.sun.jarsigner.ContentSigner
ContentSignerParameters
Problem
The function was deprecated in JDK 9. Now it's time to mark them for removal.
Solution
Add the forRemoval
argument to the related classes and update several jarsigner
outputs.
Specification
diff --git a/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java b/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java
--- a/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java
+++ b/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java
@@ -38,7 +38,7 @@
* @deprecated This class has been deprecated.
*/
-@Deprecated(since="9")
+@Deprecated(since="9", forRemoval=true)
public abstract class ContentSigner {
/**
diff --git a/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java b/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java
--- a/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java
+++ b/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java
@@ -36,7 +36,7 @@
* @author Vincent Ryan
* @deprecated This class has been deprecated.
*/
-@Deprecated(since="9")
+@Deprecated(since="9", forRemoval=true)
public interface ContentSignerParameters {
/**
diff --git a/src/jdk.jartool/share/classes/com/sun/jarsigner/package-info.java b/src/jdk.jartool/share/classes/com/sun/jarsigner/package-info.java
--- a/src/jdk.jartool/share/classes/com/sun/jarsigner/package-info.java
+++ b/src/jdk.jartool/share/classes/com/sun/jarsigner/package-info.java
@@ -30,9 +30,9 @@
* tool by supplying an alternative implementation of
* {@link com.sun.jarsigner.ContentSigner}.
*
- * The classes in this package have been deprecated. New classes should not be
- * added to this package. Use the {@link jdk.security.jarsigner.JarSigner} API
- * to sign JAR files.
+ * The classes in this package have been deprecated and will be removed in
+ * a future release. New classes should not be added to this package.
+ * Use the {@link jdk.security.jarsigner.JarSigner} API to sign JAR files.
*/
package com.sun.jarsigner;
Also, update jarsigner to show the following messages on the help screen:
$ jarsigner
Usage: jarsigner [options] jar-file alias
jarsigner -verify [options] jar-file [alias...]
....
[-altsigner <class>] class name of an alternative signing mechanism
(This option is deprecated and will be removed in a future release.)
[-altsignerpath <pathlist>] location of an alternative signing mechanism
(This option is deprecated and will be removed in a future release.)
....
An updated warning will also be shown when an deprecated option is used:
$ jarsigner -altsigner X
This option is deprecated and will be removed in a future release: -altsigner
- csr of
-
JDK-8242260 Add forRemoval=true to already deprecated ContentSigner
- Resolved