8160247: Mark deprecated javax.security.cert APIs with forRemoval=true
authorxuelei
Wed, 13 Mar 2019 07:14:50 -0700
changeset 54099 fd332722014c
parent 54098 6f75811126c3
child 54100 1a6a5a0260a7
8160247: Mark deprecated javax.security.cert APIs with forRemoval=true Reviewed-by: weijun
src/java.base/share/classes/com/sun/security/cert/internal/x509/X509V1CertImpl.java
src/java.base/share/classes/javax/net/ssl/HandshakeCompletedEvent.java
src/java.base/share/classes/javax/net/ssl/SSLSession.java
src/java.base/share/classes/javax/security/cert/Certificate.java
src/java.base/share/classes/javax/security/cert/CertificateEncodingException.java
src/java.base/share/classes/javax/security/cert/CertificateException.java
src/java.base/share/classes/javax/security/cert/CertificateExpiredException.java
src/java.base/share/classes/javax/security/cert/CertificateNotYetValidException.java
src/java.base/share/classes/javax/security/cert/CertificateParsingException.java
src/java.base/share/classes/javax/security/cert/X509Certificate.java
src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java
src/java.net.http/share/classes/jdk/internal/net/http/common/ImmutableExtendedSSLSession.java
src/java.net.http/share/classes/jdk/internal/net/http/common/ImmutableSSLSession.java
--- a/src/java.base/share/classes/com/sun/security/cert/internal/x509/X509V1CertImpl.java	Wed Mar 13 12:25:42 2019 +0000
+++ b/src/java.base/share/classes/com/sun/security/cert/internal/x509/X509V1CertImpl.java	Wed Mar 13 07:14:50 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -51,7 +51,8 @@
  *
  * @author Jeff Nisewanger
  */
-@Deprecated
+@SuppressWarnings("removal")
+@Deprecated(since="9", forRemoval=true)
 public class X509V1CertImpl extends X509Certificate implements Serializable {
     static final long serialVersionUID = -2048442350420423405L;
     private java.security.cert.X509Certificate wrappedCert;
--- a/src/java.base/share/classes/javax/net/ssl/HandshakeCompletedEvent.java	Wed Mar 13 12:25:42 2019 +0000
+++ b/src/java.base/share/classes/javax/net/ssl/HandshakeCompletedEvent.java	Wed Mar 13 07:14:50 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -162,7 +162,8 @@
      *               array of {@code java.security.cert.Certificate} should
      *               be used instead.
      */
-    @Deprecated(since="9")
+    @SuppressWarnings("removal")
+    @Deprecated(since="9", forRemoval=true)
     public javax.security.cert.X509Certificate [] getPeerCertificateChain()
             throws SSLPeerUnverifiedException
     {
--- a/src/java.base/share/classes/javax/net/ssl/SSLSession.java	Wed Mar 13 12:25:42 2019 +0000
+++ b/src/java.base/share/classes/javax/net/ssl/SSLSession.java	Wed Mar 13 07:14:50 2019 -0700
@@ -282,7 +282,8 @@
      *               array of {@code java.security.cert.Certificate} should
      *               be used instead.
      */
-    @Deprecated(since="9")
+    @SuppressWarnings("removal")
+    @Deprecated(since="9", forRemoval=true)
     public javax.security.cert.X509Certificate [] getPeerCertificateChain()
             throws SSLPeerUnverifiedException;
 
--- a/src/java.base/share/classes/javax/security/cert/Certificate.java	Wed Mar 13 12:25:42 2019 +0000
+++ b/src/java.base/share/classes/javax/security/cert/Certificate.java	Wed Mar 13 07:14:50 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -61,7 +61,8 @@
  *
  * @author Hemma Prafullchandra
  */
-@Deprecated(since="9")
+@SuppressWarnings("removal")
+@Deprecated(since="9", forRemoval=true)
 public abstract class Certificate {
 
     /**
--- a/src/java.base/share/classes/javax/security/cert/CertificateEncodingException.java	Wed Mar 13 12:25:42 2019 +0000
+++ b/src/java.base/share/classes/javax/security/cert/CertificateEncodingException.java	Wed Mar 13 07:14:50 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,7 +40,8 @@
  * @author Hemma Prafullchandra
  * @deprecated Use the classes in {@code java.security.cert} instead.
  */
-@Deprecated(since="9")
+@SuppressWarnings("removal")
+@Deprecated(since="9", forRemoval=true)
 public class CertificateEncodingException extends CertificateException {
 
     private static final long serialVersionUID = -8187642723048403470L;
--- a/src/java.base/share/classes/javax/security/cert/CertificateException.java	Wed Mar 13 12:25:42 2019 +0000
+++ b/src/java.base/share/classes/javax/security/cert/CertificateException.java	Wed Mar 13 07:14:50 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,7 +40,7 @@
  * @see Certificate
  * @deprecated Use the classes in {@code java.security.cert} instead.
  */
-@Deprecated(since="9")
+@Deprecated(since="9", forRemoval=true)
 public class CertificateException extends Exception {
 
     private static final long serialVersionUID = -5757213374030785290L;
--- a/src/java.base/share/classes/javax/security/cert/CertificateExpiredException.java	Wed Mar 13 12:25:42 2019 +0000
+++ b/src/java.base/share/classes/javax/security/cert/CertificateExpiredException.java	Wed Mar 13 07:14:50 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,7 +42,8 @@
  * @author Hemma Prafullchandra
  * @deprecated Use the classes in {@code java.security.cert} instead.
  */
-@Deprecated(since="9")
+@SuppressWarnings("removal")
+@Deprecated(since="9", forRemoval=true)
 public class CertificateExpiredException extends CertificateException {
 
     private static final long serialVersionUID = 5091601212177261883L;
--- a/src/java.base/share/classes/javax/security/cert/CertificateNotYetValidException.java	Wed Mar 13 12:25:42 2019 +0000
+++ b/src/java.base/share/classes/javax/security/cert/CertificateNotYetValidException.java	Wed Mar 13 07:14:50 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,7 +42,8 @@
  * @author Hemma Prafullchandra
  * @deprecated Use the classes in {@code java.security.cert} instead.
  */
-@Deprecated(since="9")
+@SuppressWarnings("removal")
+@Deprecated(since="9", forRemoval=true)
 public class CertificateNotYetValidException extends CertificateException {
 
     private static final long serialVersionUID = -8976172474266822818L;
--- a/src/java.base/share/classes/javax/security/cert/CertificateParsingException.java	Wed Mar 13 12:25:42 2019 +0000
+++ b/src/java.base/share/classes/javax/security/cert/CertificateParsingException.java	Wed Mar 13 07:14:50 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,7 +41,8 @@
  * @author Hemma Prafullchandra
  * @deprecated Use the classes in {@code java.security.cert} instead.
  */
-@Deprecated(since="9")
+@SuppressWarnings("removal")
+@Deprecated(since="9", forRemoval=true)
 public class CertificateParsingException extends CertificateException {
 
     private static final long serialVersionUID = -8449352422951136229L;
--- a/src/java.base/share/classes/javax/security/cert/X509Certificate.java	Wed Mar 13 12:25:42 2019 +0000
+++ b/src/java.base/share/classes/javax/security/cert/X509Certificate.java	Wed Mar 13 07:14:50 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -126,7 +126,8 @@
  * @see java.security.Security security properties
  * @deprecated Use the classes in {@code java.security.cert} instead.
  */
-@Deprecated(since="9")
+@SuppressWarnings("removal")
+@Deprecated(since="9", forRemoval=true)
 public abstract class X509Certificate extends Certificate {
 
     /*
--- a/src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java	Wed Mar 13 12:25:42 2019 +0000
+++ b/src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java	Wed Mar 13 07:14:50 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -597,7 +597,8 @@
      *  Use {@code getPeerCertificates()} instead.
      */
     @Override
-    @Deprecated
+    @SuppressWarnings("removal")
+    @Deprecated(since="9", forRemoval=true)
     public javax.security.cert.X509Certificate[] getPeerCertificateChain()
             throws SSLPeerUnverifiedException {
         //
--- a/src/java.net.http/share/classes/jdk/internal/net/http/common/ImmutableExtendedSSLSession.java	Wed Mar 13 12:25:42 2019 +0000
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/common/ImmutableExtendedSSLSession.java	Wed Mar 13 07:14:50 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -92,7 +92,8 @@
         return delegate.getLocalCertificates();
     }
 
-    @Deprecated
+    @SuppressWarnings("removal")
+    @Deprecated(since="11", forRemoval=true)
     public javax.security.cert.X509Certificate [] getPeerCertificateChain()
             throws SSLPeerUnverifiedException {
         return delegate.getPeerCertificateChain();
--- a/src/java.net.http/share/classes/jdk/internal/net/http/common/ImmutableSSLSession.java	Wed Mar 13 12:25:42 2019 +0000
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/common/ImmutableSSLSession.java	Wed Mar 13 07:14:50 2019 -0700
@@ -91,7 +91,8 @@
         return delegate.getLocalCertificates();
     }
 
-    @Deprecated
+    @SuppressWarnings("removal")
+    @Deprecated(since="11", forRemoval=true)
     public javax.security.cert.X509Certificate [] getPeerCertificateChain()
             throws SSLPeerUnverifiedException {
         return delegate.getPeerCertificateChain();