8221270: Duplicated synchronized keywords in SSLSocketImpl

Reviewed-by: mullan
This commit is contained in:
Xue-Lei Andrew Fan 2019-03-21 13:32:08 -07:00
parent ed5a2f1e06
commit 901e797c0c

View File

@ -342,15 +342,8 @@ public final class SSLSocketImpl
@Override
public synchronized SSLSession getHandshakeSession() {
if (conContext.handshakeContext != null) {
synchronized (this) {
if (conContext.handshakeContext != null) {
return conContext.handshakeContext.handshakeSession;
}
}
}
return null;
return conContext.handshakeContext == null ?
null : conContext.handshakeContext.handshakeSession;
}
@Override