--- a/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java Thu Mar 21 19:56:31 2019 +0000
+++ b/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java Thu Mar 21 13:32:08 2019 -0700
@@ -342,15 +342,8 @@
@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