Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8221270

Duplicated synchronized keywords in SSLSocketImpl

XMLWordPrintable

    • b14
    • Not verified

        In the following code, two synchronization locks are used. One synchronization lock is sufficient.
            @Override
            public synchronized SSLSession getHandshakeSession() {
                if (conContext.handshakeContext != null) {
                    synchronized (this) {
                        if (conContext.handshakeContext != null) {
                            return conContext.handshakeContext.handshakeSession;
                        }
                    }
                }

                return null;
            }

              xuelei Xuelei Fan
              xuelei Xuelei Fan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: