JDK-7167092 : Need to put the return clause in the synchronized block
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.net.ssl
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-05-08
  • Updated: 2013-06-24
  • Resolved: 2012-05-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b40Fixed
Related Reports
Relates :  
Description
Need to put the return clause in the synchronized block, in SSLContextImpl.getSuportedCipherSuiteList() and SSLContextImpl.getDefaultCipherSuiteList():

    // Get suported CipherSuiteList.
    CipherSuiteList getSuportedCipherSuiteList() {
        // The maintenance of cipher suites needs to be synchronized.
        synchronized (this) {
            // Clear cache of available ciphersuites.
            clearAvailableCache();

            if (supportedCipherSuiteList == null) {
                supportedCipherSuiteList = getApplicableCipherSuiteList(
                        getSuportedProtocolList(), false);
            }

+           return supportedCipherSuiteList;
        }
-       return supportedCipherSuiteList;
    }

Similar update to SSLContextImpl.getDefaultCipherSuiteList.

Comments
Add return value for the methods. Code looks good.
23-01-2013

EVALUATION See description.
08-05-2012