7084040: Clearup warning in HttpsURLConnection
Reviewed-by: xuelei
Contributed-by: nsebastian.sickelmann@gmx.de
--- 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;
}