JDK-8066619 : Fix deprecation warnings in java.util.jar
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-12-03
  • Updated: 2019-01-07
  • Resolved: 2018-12-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13
13 b02Fixed
Related Reports
Relates :  
Comments
The IDN warnings are from code that's originally ported from ICU. They need cleanup and will probably be reorganized; see JDK-8174270. As such, it doesn't make sense to do any actual cleanup for those warnings, so they should simply be left suppressed. That leaves the following four warnings: jdk/src/java.base/share/classes/java/util/jar/Attributes.java:310: warning: [deprecation] String(byte[],int,int,int) in String has been deprecated jdk/src/java.base/share/classes/java/util/jar/Attributes.java:354: warning: [deprecation] String(byte[],int,int,int) in String has been deprecated jdk/src/java.base/share/classes/java/util/jar/Attributes.java:411: warning: [deprecation] String(byte[],int,int,int) in String has been deprecated jdk/src/java.base/share/classes/java/util/jar/Manifest.java:156: warning: [deprecation] String(byte[],int,int,int) in String has been deprecated Since all of these are in the java.util.jar package, I'll repurpose this bug to cover cleanup of just this warning. Adjusting the subcomponent and summary accordingly.
16-05-2017

I've rearranged a bunch of the warnings in this subtask, in consultation with Brad Wetmore. > jdk/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java > jdk/src/java.base/share/classes/com/sun/crypto/provider/RSACipher.java Warnings from these files have been moved to a new subtask JDK-8180132 covering javax.crypto. > jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsKeyMaterialGenerator.java > jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsMasterSecretGenerator.java > jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsPrfGenerator.java > jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java > jdk/src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java > jdk/src/java.base/share/classes/sun/security/ssl/Handshaker.java > jdk/src/java.base/share/classes/sun/security/ssl/RSAClientKeyExchange.java > jdk/src/java.base/share/classes/sun/security/ssl/RSASignature.java Warnings from these files have been transferred to a new subtask JDK-8180134 covering javax.net.ssl. > jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java > jdk/src/java.base/share/classes/com/sun/net/ssl/internal/www/protocol/https/DelegateHttpsURLConnection.java > jdk/src/java.base/share/classes/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnectionOldImpl.java This implementation is obsolete and deprecated, and the deprecation warnings are for uses of other components within com/sun/net/ssl. The warnings suppression for these files should be left in place. > jdk/src/java.base/share/classes/java/util/zip/CRC32C.java > jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java > jdk/src/java.base/share/classes/sun/text/normalizer/RuleCharacterIterator.java The warnings for these files no longer occur. (RuleCharacterIterator.java is no longer present.) Remaining warnings are as follows: jdk/src/java.base/share/classes/java/util/jar/Attributes.java:310: warning: [deprecation] String(byte[],int,int,int) in String has been deprecated jdk/src/java.base/share/classes/java/util/jar/Attributes.java:354: warning: [deprecation] String(byte[],int,int,int) in String has been deprecated jdk/src/java.base/share/classes/java/util/jar/Attributes.java:411: warning: [deprecation] String(byte[],int,int,int) in String has been deprecated jdk/src/java.base/share/classes/java/util/jar/Manifest.java:156: warning: [deprecation] String(byte[],int,int,int) in String has been deprecated jdk/src/java.base/share/classes/sun/net/idn/UCharacterDirection.java:49: warning: [deprecation] UCharacterEnums in sun.net.idn has been deprecated jdk/src/java.base/share/classes/sun/net/idn/UCharacterDirection.java:49: warning: [deprecation] ECharacterDirection in UCharacterEnums has been deprecated
11-05-2017

At time of writing, the deprecation messages in java.base are: dev/jdk/src/java.base/share/classes/java/util/jar/Attributes.java:310: warning: [deprecation] String(byte[],int,int,int) in String has been deprecated dev/jdk/src/java.base/share/classes/java/util/jar/Attributes.java:354: warning: [deprecation] String(byte[],int,int,int) in String has been deprecated dev/jdk/src/java.base/share/classes/java/util/jar/Attributes.java:411: warning: [deprecation] String(byte[],int,int,int) in String has been deprecated dev/jdk/src/java.base/share/classes/java/util/jar/Manifest.java:156: warning: [deprecation] String(byte[],int,int,int) in String has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java:267: warning: [deprecation] equals(ObjectIdentifier) in ObjectIdentifier has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java:296: warning: [deprecation] equals(ObjectIdentifier) in ObjectIdentifier has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java:326: warning: [deprecation] equals(ObjectIdentifier) in ObjectIdentifier has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java:328: warning: [deprecation] equals(ObjectIdentifier) in ObjectIdentifier has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java:330: warning: [deprecation] equals(ObjectIdentifier) in ObjectIdentifier has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java:332: warning: [deprecation] equals(ObjectIdentifier) in ObjectIdentifier has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java:334: warning: [deprecation] equals(ObjectIdentifier) in ObjectIdentifier has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java:358: warning: [deprecation] equals(ObjectIdentifier) in ObjectIdentifier has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java:364: warning: [deprecation] equals(ObjectIdentifier) in ObjectIdentifier has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/RSACipher.java:284: warning: [deprecation] TlsRsaPremasterSecretParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/RSACipher.java:453: warning: [deprecation] TlsRsaPremasterSecretParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/RSACipher.java:460: warning: [deprecation] TlsRsaPremasterSecretParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/RSACipher.java:461: warning: [deprecation] TlsRsaPremasterSecretParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsPrfGenerator.java:115: warning: [deprecation] TlsPrfParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsPrfGenerator.java:126: warning: [deprecation] TlsPrfParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsPrfGenerator.java:129: warning: [deprecation] TlsPrfParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsKeyMaterialGenerator.java:49: warning: [deprecation] TlsKeyMaterialParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsKeyMaterialGenerator.java:62: warning: [deprecation] TlsKeyMaterialParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsKeyMaterialGenerator.java:65: warning: [deprecation] TlsKeyMaterialParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsKeyMaterialGenerator.java:182: warning: [deprecation] TlsKeyMaterialSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsKeyMaterialGenerator.java:274: warning: [deprecation] TlsKeyMaterialSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsMasterSecretGenerator.java:49: warning: [deprecation] TlsMasterSecretParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsMasterSecretGenerator.java:62: warning: [deprecation] TlsMasterSecretParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsMasterSecretGenerator.java:65: warning: [deprecation] TlsMasterSecretParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsMasterSecretGenerator.java:142: warning: [deprecation] TlsMasterSecret in sun.security.internal.interfaces has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java:47: warning: [deprecation] TlsRsaPremasterSecretParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java:59: warning: [deprecation] TlsRsaPremasterSecretParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java:62: warning: [deprecation] TlsRsaPremasterSecretParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:279: warning: [deprecation] SSLContextSpi in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:288: warning: [deprecation] KeyManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:288: warning: [deprecation] TrustManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:315: warning: [deprecation] X509KeyManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:318: warning: [deprecation] X509KeyManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:353: warning: [deprecation] X509TrustManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:356: warning: [deprecation] X509TrustManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:390: warning: [deprecation] TrustManagerFactorySpi in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:404: warning: [deprecation] TrustManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:412: warning: [deprecation] TrustManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:412: warning: [deprecation] TrustManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:415: warning: [deprecation] TrustManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:419: warning: [deprecation] TrustManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:425: warning: [deprecation] TrustManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:432: warning: [deprecation] TrustManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:433: warning: [deprecation] TrustManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:441: warning: [deprecation] KeyManagerFactorySpi in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:457: warning: [deprecation] KeyManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:465: warning: [deprecation] KeyManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:465: warning: [deprecation] KeyManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:468: warning: [deprecation] KeyManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:472: warning: [deprecation] KeyManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:478: warning: [deprecation] KeyManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:485: warning: [deprecation] KeyManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:486: warning: [deprecation] KeyManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:499: warning: [deprecation] X509KeyManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:501: warning: [deprecation] X509KeyManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:596: warning: [deprecation] X509TrustManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:598: warning: [deprecation] X509TrustManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:625: warning: [deprecation] X509KeyManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java:660: warning: [deprecation] X509TrustManager in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/internal/www/protocol/https/DelegateHttpsURLConnection.java:65: warning: [deprecation] HttpsURLConnection in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/internal/www/protocol/https/DelegateHttpsURLConnection.java:69: warning: [deprecation] HttpsURLConnection in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/internal/www/protocol/https/DelegateHttpsURLConnection.java:76: warning: [deprecation] HttpsURLConnection in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/internal/www/protocol/https/DelegateHttpsURLConnection.java:102: warning: [deprecation] HostnameVerifier in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/internal/www/protocol/https/DelegateHttpsURLConnection.java:104: warning: [deprecation] HostnameVerifier in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnectionOldImpl.java:68: warning: [deprecation] HttpsURLConnection in com.sun.net.ssl has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java:927: warning: [deprecation] SymbolTable in sun.text.normalizer has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java:975: warning: [deprecation] SymbolTable in sun.text.normalizer has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java:1066: warning: [deprecation] lookupMatcher(int) in SymbolTable has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java:1230: warning: [deprecation] SymbolTable in sun.text.normalizer has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java:1230: warning: [deprecation] SYMBOL_REF in SymbolTable has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java:1242: warning: [deprecation] SymbolTable in sun.text.normalizer has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java:1242: warning: [deprecation] SYMBOL_REF in SymbolTable has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java:1253: warning: [deprecation] SymbolTable in sun.text.normalizer has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java:1253: warning: [deprecation] SYMBOL_REF in SymbolTable has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java:1708: warning: [deprecation] SymbolTable in sun.text.normalizer has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java:1749: warning: [deprecation] SymbolTable in sun.text.normalizer has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java:1844: warning: [deprecation] SymbolTable in sun.text.normalizer has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/RuleCharacterIterator.java:80: warning: [deprecation] SymbolTable in sun.text.normalizer has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/RuleCharacterIterator.java:135: warning: [deprecation] SymbolTable in sun.text.normalizer has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/RuleCharacterIterator.java:169: warning: [deprecation] SymbolTable in sun.text.normalizer has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/RuleCharacterIterator.java:169: warning: [deprecation] SYMBOL_REF in SymbolTable has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/RuleCharacterIterator.java:171: warning: [deprecation] parseReference(String,ParsePosition,int) in SymbolTable has been deprecated dev/jdk/src/java.base/share/classes/sun/text/normalizer/RuleCharacterIterator.java:178: warning: [deprecation] lookup(String) in SymbolTable has been deprecated dev/jdk/src/java.base/share/classes/java/util/zip/CRC32C.java:230: warning: [deprecation] getInt(Object,int) in Unsafe has been deprecated dev/jdk/src/java.base/share/classes/java/util/zip/CRC32C.java:231: warning: [deprecation] getInt(Object,int) in Unsafe has been deprecated dev/jdk/src/java.base/share/classes/java/util/zip/CRC32C.java:234: warning: [deprecation] getLong(Object,int) in Unsafe has been deprecated dev/jdk/src/java.base/share/classes/sun/net/idn/UCharacterDirection.java:49: warning: [deprecation] UCharacterEnums in sun.net.idn has been deprecated dev/jdk/src/java.base/share/classes/sun/net/idn/UCharacterDirection.java:49: warning: [deprecation] ECharacterDirection in UCharacterEnums has been deprecated dev/jdk/src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java:1966: warning: [deprecation] TlsPrfParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java:1966: warning: [deprecation] TlsPrfParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/sun/security/ssl/Handshaker.java:1125: warning: [deprecation] TlsMasterSecretParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/sun/security/ssl/Handshaker.java:1125: warning: [deprecation] TlsMasterSecretParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/sun/security/ssl/Handshaker.java:1200: warning: [deprecation] TlsKeyMaterialParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/sun/security/ssl/Handshaker.java:1200: warning: [deprecation] TlsKeyMaterialParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/sun/security/ssl/Handshaker.java:1210: warning: [deprecation] TlsKeyMaterialSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/sun/security/ssl/Handshaker.java:1210: warning: [deprecation] TlsKeyMaterialSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/sun/security/ssl/RSAClientKeyExchange.java:78: warning: [deprecation] TlsRsaPremasterSecretParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/sun/security/ssl/RSAClientKeyExchange.java:117: warning: [deprecation] TlsRsaPremasterSecretParameterSpec in sun.security.internal.spec has been deprecated dev/jdk/src/java.base/share/classes/sun/security/ssl/RSASignature.java:202: warning: [deprecation] engineGetParameter(String) in SignatureSpi has been deprecated dev/jdk/src/java.base/share/classes/sun/security/ssl/RSASignature.java:186: warning: [deprecation] engineSetParameter(String,Object) in SignatureSpi has been deprecated dev/jdk/src/java.base/share/classes/sun/security/ssl/RSASignature.java:87: warning: [deprecation] setParameter(String,Object) in Signature has been deprecated
03-12-2014