jdk/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java
--- 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();
}
}