OpenJDK / jdk / jdk
changeset 54221:727ab25a4e24
8221270: Duplicated synchronized keywords in SSLSocketImpl
Reviewed-by: mullan
author | xuelei |
---|---|
date | Thu, 21 Mar 2019 13:32:08 -0700 |
parents | 7fbb4340b125 |
children | 1928a50e7e83 |
files | src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java |
diffstat | 1 files changed, 2 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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