changeset 4518:e4729ad0d7b5

7084040: Clearup warning in HttpsURLConnection Reviewed-by: xuelei Contributed-by: nsebastian.sickelmann@gmx.de
author xuelei
date Sat, 27 Aug 2011 02:17:33 -0700
parents 9bd06beac455
children 83add4632b49
files src/share/classes/javax/net/ssl/HttpsURLConnection.java
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/net/ssl/HttpsURLConnection.java	Fri Aug 26 15:40:32 2011 -0700
+++ b/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;
         }