7084040: Clearup warning in HttpsURLConnection
authorxuelei
Sat, 27 Aug 2011 02:17:33 -0700
changeset 10367 d61bc9ec5dce
parent 10366 713afa0a0349
child 10368 79494b8dc2b1
7084040: Clearup warning in HttpsURLConnection Reviewed-by: xuelei Contributed-by: nsebastian.sickelmann@gmx.de
jdk/src/share/classes/javax/net/ssl/HttpsURLConnection.java
--- a/jdk/src/share/classes/javax/net/ssl/HttpsURLConnection.java	Fri Aug 26 15:40:32 2011 -0700
+++ b/jdk/src/share/classes/javax/net/ssl/HttpsURLConnection.java	Sat Aug 27 02:17:33 2011 -0700
@@ -144,8 +144,7 @@
             throws SSLPeerUnverifiedException {
 
         java.security.cert.Certificate[] certs = getServerCertificates();
-        return ((X500Principal)
-                ((X509Certificate)certs[0]).getSubjectX500Principal());
+        return ((X509Certificate)certs[0]).getSubjectX500Principal();
     }
 
     /**
@@ -173,8 +172,7 @@
 
         java.security.cert.Certificate[] certs = getLocalCertificates();
         if (certs != null) {
-            return ((X500Principal)
-                ((X509Certificate)certs[0]).getSubjectX500Principal());
+            return ((X509Certificate)certs[0]).getSubjectX500Principal();
         } else {
             return null;
         }