8073430: Deprecate security APIs that have been superseded
authorjuh
Mon, 09 Mar 2015 17:21:07 -0700
changeset 29377 d3f457ce9c48
parent 29376 ff7f17f3e2da
child 29378 0b887bd67c55
8073430: Deprecate security APIs that have been superseded Reviewed-by: mullan, weijun
jdk/src/java.base/share/classes/com/sun/security/cert/internal/x509/X509V1CertImpl.java
jdk/src/java.base/share/classes/java/security/acl/Acl.java
jdk/src/java.base/share/classes/java/security/acl/AclEntry.java
jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java
jdk/src/java.base/share/classes/java/security/acl/Group.java
jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java
jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java
jdk/src/java.base/share/classes/java/security/acl/Owner.java
jdk/src/java.base/share/classes/java/security/acl/Permission.java
jdk/src/java.base/share/classes/java/security/acl/package-info.java
jdk/src/java.base/share/classes/javax/net/ssl/HandshakeCompletedEvent.java
jdk/src/java.base/share/classes/javax/net/ssl/SSLSession.java
jdk/src/java.base/share/classes/javax/security/cert/Certificate.java
jdk/src/java.base/share/classes/javax/security/cert/CertificateEncodingException.java
jdk/src/java.base/share/classes/javax/security/cert/CertificateException.java
jdk/src/java.base/share/classes/javax/security/cert/CertificateExpiredException.java
jdk/src/java.base/share/classes/javax/security/cert/CertificateNotYetValidException.java
jdk/src/java.base/share/classes/javax/security/cert/CertificateParsingException.java
jdk/src/java.base/share/classes/javax/security/cert/X509Certificate.java
jdk/src/java.base/share/classes/javax/security/cert/package-info.java
jdk/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java
jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java
jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java
jdk/src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java
--- a/jdk/src/java.base/share/classes/com/sun/security/cert/internal/x509/X509V1CertImpl.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/com/sun/security/cert/internal/x509/X509V1CertImpl.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -45,8 +45,13 @@
  * The X509V1CertImpl class is used as a conversion wrapper around
  * sun.security.x509.X509Cert certificates when running under JDK1.1.x.
  *
+ * @deprecated This is the implementation class for the deprecated
+ *  {@code javax.security.cert.X509Certificate} class. The classes in the
+ *  {@code java.security.cert} package should be used instead.
+ *
  * @author Jeff Nisewanger
  */
+@Deprecated
 public class X509V1CertImpl extends X509Certificate implements Serializable {
     static final long serialVersionUID = -2048442350420423405L;
     private java.security.cert.X509Certificate wrappedCert;
--- a/jdk/src/java.base/share/classes/java/security/acl/Acl.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/java/security/acl/Acl.java	Mon Mar 09 17:21:07 2015 -0700
@@ -82,8 +82,12 @@
  * @see java.security.acl.Acl#getPermissions
  *
  * @author Satish Dharmaraj
+ *
+ * @deprecated This package has been replaced by {@code java.security.Policy}
+ *      and related classes since 1.2.
  */
 
+@Deprecated
 public interface Acl extends Owner {
 
     /**
--- a/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -50,7 +50,11 @@
  * @see java.security.acl.Acl
  *
  * @author      Satish Dharmaraj
+ *
+ * @deprecated This package has been replaced by {@code java.security.Policy}
+ *      and related classes since 1.2.
  */
+@Deprecated
 public interface AclEntry extends Cloneable {
 
     /**
--- a/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -30,7 +30,11 @@
  * non-existent ACL (Access Control List).
  *
  * @author      Satish Dharmaraj
+ *
+ * @deprecated This package has been replaced by {@code java.security.Policy}
+ *      and related classes since 1.2.
  */
+@Deprecated
 public class AclNotFoundException extends Exception {
 
     private static final long serialVersionUID = 5684295034092681791L;
--- a/jdk/src/java.base/share/classes/java/security/acl/Group.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/java/security/acl/Group.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -39,7 +39,11 @@
  * Principal or Group.
  *
  * @author      Satish Dharmaraj
+ *
+ * @deprecated This package has been replaced by {@code java.security.Policy}
+ *      and related classes since 1.2.
  */
+@Deprecated
 public interface Group extends Principal {
 
     /**
--- a/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -32,7 +32,11 @@
  * @see java.security.acl.Owner#deleteOwner
  *
  * @author Satish Dharmaraj
+ *
+ * @deprecated This package has been replaced by {@code java.security.Policy}
+ *      and related classes since 1.2.
  */
+@Deprecated
 public class LastOwnerException extends Exception {
 
     private static final long serialVersionUID = -5141997548211140359L;
--- a/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -31,7 +31,11 @@
  * the object, but the Principal attempting the modification is not an owner.
  *
  * @author      Satish Dharmaraj
+ *
+ * @deprecated This package has been replaced by {@code java.security.Policy}
+ *      and related classes since 1.2.
  */
+@Deprecated
 public class NotOwnerException extends Exception {
 
     private static final long serialVersionUID = -5555597911163362399L;
--- a/jdk/src/java.base/share/classes/java/security/acl/Owner.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/java/security/acl/Owner.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -36,7 +36,10 @@
  *
  * @see java.security.acl.Acl
  *
+ * @deprecated This package has been replaced by {@code java.security.Policy}
+ *      and related classes since 1.2.
  */
+@Deprecated
 public interface Owner {
 
     /**
--- a/jdk/src/java.base/share/classes/java/security/acl/Permission.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/java/security/acl/Permission.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -31,7 +31,11 @@
  * a particular type of access to a resource.
  *
  * @author Satish Dharmaraj
+ *
+ * @deprecated This package has been replaced by {@code java.security.Policy}
+ *      and related classes since 1.2.
  */
+@Deprecated
 public interface Permission {
 
     /**
--- a/jdk/src/java.base/share/classes/java/security/acl/package-info.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/java/security/acl/package-info.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -24,10 +24,12 @@
  */
 
 /**
- * The classes and interfaces in this package have been
- * superseded by classes in the java.security package.
- * See that package and, for example, java.security.Permission for details.
+ * The classes and interfaces in this package have been deprecated.
+ * The {@code java.security} package contains suitable replacements.
+ * See that package and, for example, {@code java.security.Permission}
+ * for details.
  *
  * @since 1.1
  */
+@Deprecated
 package java.security.acl;
--- a/jdk/src/java.base/share/classes/javax/net/ssl/HandshakeCompletedEvent.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/HandshakeCompletedEvent.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -152,7 +152,11 @@
      *          {@link javax.security.cert.X509Certificate} format).
      * @exception SSLPeerUnverifiedException if the peer is not verified.
      * @see #getPeerPrincipal()
+     * @deprecated The {@link #getPeerCertificates()} method that returns an
+     *               array of {@code java.security.cert.Certificate} should
+     *               be used instead.
      */
+    @Deprecated
     public javax.security.cert.X509Certificate [] getPeerCertificateChain()
             throws SSLPeerUnverifiedException
     {
--- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLSession.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLSession.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -272,7 +272,11 @@
      * @exception SSLPeerUnverifiedException if the peer's identity
      *          has not been verified
      * @see #getPeerPrincipal()
+     * @deprecated The {@link #getPeerCertificates()} method that returns an
+     *               array of {@code java.security.cert.Certificate} should
+     *               be used instead.
      */
+    @Deprecated
     public javax.security.cert.X509Certificate [] getPeerCertificateChain()
             throws SSLPeerUnverifiedException;
 
--- a/jdk/src/java.base/share/classes/javax/security/cert/Certificate.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/javax/security/cert/Certificate.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -57,9 +57,11 @@
  *
  * @since 1.4
  * @see X509Certificate
+ * @deprecated Use the classes in {@code java.security.cert} instead.
  *
  * @author Hemma Prafullchandra
  */
+@Deprecated
 public abstract class Certificate {
 
     /**
--- a/jdk/src/java.base/share/classes/javax/security/cert/CertificateEncodingException.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/javax/security/cert/CertificateEncodingException.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -38,7 +38,9 @@
  *
  * @since 1.4
  * @author Hemma Prafullchandra
+ * @deprecated Use the classes in {@code java.security.cert} instead.
  */
+@Deprecated
 public class CertificateEncodingException extends CertificateException {
 
     private static final long serialVersionUID = -8187642723048403470L;
--- a/jdk/src/java.base/share/classes/javax/security/cert/CertificateException.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/javax/security/cert/CertificateException.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -38,7 +38,9 @@
  * @author Hemma Prafullchandra
  * @since 1.4
  * @see Certificate
+ * @deprecated Use the classes in {@code java.security.cert} instead.
  */
+@Deprecated
 public class CertificateException extends Exception {
 
     private static final long serialVersionUID = -5757213374030785290L;
--- a/jdk/src/java.base/share/classes/javax/security/cert/CertificateExpiredException.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/javax/security/cert/CertificateExpiredException.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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,9 @@
  *
  * @since 1.4
  * @author Hemma Prafullchandra
+ * @deprecated Use the classes in {@code java.security.cert} instead.
  */
+@Deprecated
 public class CertificateExpiredException extends CertificateException {
 
     private static final long serialVersionUID = 5091601212177261883L;
--- a/jdk/src/java.base/share/classes/javax/security/cert/CertificateNotYetValidException.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/javax/security/cert/CertificateNotYetValidException.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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,9 @@
  *
  * @since 1.4
  * @author Hemma Prafullchandra
+ * @deprecated Use the classes in {@code java.security.cert} instead.
  */
+@Deprecated
 public class CertificateNotYetValidException extends CertificateException {
 
     private static final long serialVersionUID = -8976172474266822818L;
--- a/jdk/src/java.base/share/classes/javax/security/cert/CertificateParsingException.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/javax/security/cert/CertificateParsingException.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -39,7 +39,9 @@
  *
  * @since 1.4
  * @author Hemma Prafullchandra
+ * @deprecated Use the classes in {@code java.security.cert} instead.
  */
+@Deprecated
 public class CertificateParsingException extends CertificateException {
 
     private static final long serialVersionUID = -8449352422951136229L;
--- a/jdk/src/java.base/share/classes/javax/security/cert/X509Certificate.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/javax/security/cert/X509Certificate.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -124,7 +124,9 @@
  * @see Certificate
  * @see java.security.cert.X509Extension
  * @see java.security.Security security properties
+ * @deprecated Use the classes in {@code java.security.cert} instead.
  */
+@Deprecated
 public abstract class X509Certificate extends Certificate {
 
     /*
--- a/jdk/src/java.base/share/classes/javax/security/cert/package-info.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/javax/security/cert/package-info.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, 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
@@ -26,15 +26,16 @@
 /**
  * Provides classes for public key certificates.
  *
- * These classes include a simplified version of the
- * java.security.cert package.  These classes were developed
- * as part of the Java Secure Socket
+ * This package has been deprecated. These classes include a simplified
+ * version of the {@code java.security.cert} package.  These classes were
+ * developed as part of the Java Secure Socket
  * Extension (JSSE).  When JSSE was added to the J2SE version 1.4, this
  * package was added for backward-compatibility reasons only.
  *
  * New applications should not use this package, but rather
- * java.security.cert.
+ * {@code java.security.cert}.
  *
  * @since 1.4
  */
+@Deprecated
 package javax.security.cert;
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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
@@ -244,7 +244,9 @@
     public java.security.cert.Certificate[] getServerCertificates()
             throws SSLPeerUnverifiedException {
         if (cachedResponse != null) {
-            List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getServerCertificateChain();
+            List<java.security.cert.Certificate> l =
+                    ((SecureCacheResponse)cachedResponse)
+                            .getServerCertificateChain();
             if (l == null) {
                 return null;
             } else {
@@ -262,7 +264,12 @@
     /**
      * Returns the server's X.509 certificate chain, or null if
      * the server did not authenticate.
+     *
+     * @deprecated This method returns the deprecated
+     *  {@code javax.security.cert.X509Certificate} type.
+     *  Use {@code getServerCertificates()} instead.
      */
+    @Deprecated
     public javax.security.cert.X509Certificate[] getServerCertificateChain()
             throws SSLPeerUnverifiedException {
         if (cachedResponse != null) {
@@ -271,7 +278,7 @@
         if (http == null) {
             throw new IllegalStateException("connection not yet open");
         } else {
-            return ((HttpsClient)http).getServerCertificateChain ();
+            return ((HttpsClient)http).getServerCertificateChain();
         }
     }
 
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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
@@ -699,7 +699,12 @@
     /**
      * Returns the X.509 certificate chain with which the server
      * authenticated itself, or null if the server did not authenticate.
+     *
+     * @deprecated This method returns the deprecated
+     *  {@code javax.security.cert.X509Certificate} type.
+     *  Use {@code getServerCertificates()} instead.
      */
+    @Deprecated
     javax.security.cert.X509Certificate [] getServerCertificateChain()
             throws SSLPeerUnverifiedException
     {
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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
@@ -204,7 +204,12 @@
      * NOTE: This method is not necessary for the version of this class
      * implementing javax.net.ssl.HttpsURLConnection, but provided for
      * compatibility with the com.sun.net.ssl.HttpsURLConnection version.
+     *
+     * @deprecated This method returns the deprecated
+     *  {@code javax.security.cert.X509Certificate} type.
+     *  Use {@code getServerCertificates()} instead.
      */
+    @Deprecated
     public javax.security.cert.X509Certificate[] getServerCertificateChain() {
         try {
             return delegate.getServerCertificateChain();
--- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java	Mon Mar 09 18:48:40 2015 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java	Mon Mar 09 17:21:07 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -464,8 +464,13 @@
      *
      * @return array of peer X.509 certs, with the peer's own cert
      *  first in the chain, and with the "root" CA last.
+     *
+     * @deprecated This method returns the deprecated
+     *  {@code javax.security.cert.X509Certificate} type.
+     *  Use {@code getPeerCertificates()} instead.
      */
     @Override
+    @Deprecated
     public javax.security.cert.X509Certificate[] getPeerCertificateChain()
             throws SSLPeerUnverifiedException {
         //