8257448: Clean duplicated non-null check in the SunJSSE provider implementation

Reviewed-by: mullan
This commit is contained in:
Xue-Lei Andrew Fan 2020-11-30 21:57:14 +00:00
parent 41dbc139ab
commit ae5b5268f3
2 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ enum Alert {
}
SSLException ssle;
if ((cause != null) && (cause instanceof IOException)) {
if (cause instanceof IOException) {
ssle = new SSLException(reason);
} else if ((this == UNEXPECTED_MESSAGE)) {
ssle = new SSLProtocolException(reason);

View File

@ -370,7 +370,7 @@ final class X509TrustManagerImpl extends X509ExtendedTrustManager
private static List<SNIServerName> getRequestedServerNames(
SSLSession session) {
if (session != null && (session instanceof ExtendedSSLSession)) {
if (session instanceof ExtendedSSLSession) {
return ((ExtendedSSLSession)session).getRequestedServerNames();
}