7084040: Clearup warning in HttpsURLConnection

Reviewed-by: xuelei
This commit is contained in:
Sebastian Sickelmann 2011-08-27 02:17:33 -07:00 committed by Xue-Lei Andrew Fan
parent 580eaf6b7a
commit ca2767a5d3

View File

@ -144,8 +144,7 @@ class HttpsURLConnection extends HttpURLConnection
throws SSLPeerUnverifiedException {
java.security.cert.Certificate[] certs = getServerCertificates();
return ((X500Principal)
((X509Certificate)certs[0]).getSubjectX500Principal());
return ((X509Certificate)certs[0]).getSubjectX500Principal();
}
/**
@ -173,8 +172,7 @@ class HttpsURLConnection extends HttpURLConnection
java.security.cert.Certificate[] certs = getLocalCertificates();
if (certs != null) {
return ((X500Principal)
((X509Certificate)certs[0]).getSubjectX500Principal());
return ((X509Certificate)certs[0]).getSubjectX500Principal();
} else {
return null;
}