< prev index next >
src/share/classes/sun/security/ssl/SSLSessionImpl.java
Print this page
rev 1388 : 6600143: Remove another 450 unnecessary casts
Reviewed-by: alanb, iris, lmalvent, bristor, peterjones, darcy, wetmore
*** 480,490 ****
(cipherSuite.keyExchange == K_KRB5_EXPORT)) {
throw new SSLPeerUnverifiedException("no certificates expected"
+ " for Kerberos cipher suites");
}
if (peerCerts != null) {
! return (X509Certificate [])peerCerts.clone();
} else {
throw new SSLPeerUnverifiedException("peer not authenticated");
}
}
--- 480,490 ----
(cipherSuite.keyExchange == K_KRB5_EXPORT)) {
throw new SSLPeerUnverifiedException("no certificates expected"
+ " for Kerberos cipher suites");
}
if (peerCerts != null) {
! return peerCerts.clone();
} else {
throw new SSLPeerUnverifiedException("peer not authenticated");
}
}
*** 511,521 ****
}
}
if (peerCerts == null) {
throw new SSLPeerUnverifiedException("peer not authenticated");
}
! return ((X500Principal)peerCerts[0].getSubjectX500Principal());
}
/**
* Returns the principal that was sent to the peer during handshaking.
*
--- 511,521 ----
}
}
if (peerCerts == null) {
throw new SSLPeerUnverifiedException("peer not authenticated");
}
! return peerCerts[0].getSubjectX500Principal();
}
/**
* Returns the principal that was sent to the peer during handshaking.
*
*** 530,540 ****
(cipherSuite.keyExchange == K_KRB5_EXPORT)) {
return (localPrincipal == null ? null :
(KerberosPrincipal)localPrincipal);
}
return (localCerts == null ? null :
! (X500Principal)localCerts[0].getSubjectX500Principal());
}
/**
* Returns the time this session was created.
*/
--- 530,540 ----
(cipherSuite.keyExchange == K_KRB5_EXPORT)) {
return (localPrincipal == null ? null :
(KerberosPrincipal)localPrincipal);
}
return (localCerts == null ? null :
! localCerts[0].getSubjectX500Principal());
}
/**
* Returns the time this session was created.
*/
< prev index next >