JDK-8282617 : sun.net.www.protocol.https.HttpsClient#putInKeepAliveCache() doesn't use a lock while dealing with "inCache" field
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-03-03
  • Updated: 2022-03-07
  • Resolved: 2022-03-06
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 19
19 masterFixed
Related Reports
Relates :  
Description
HttpsClient extends sun.net.www.http.HttpClient. HttpClient internally uses a lock when dealing with internal state, in methods like putInKeepAliveCache(). The HttpsClient overrides this method and in its implementation it doesn't use the lock when dealing with the "inCache" internal field. This looks like an oversight.
Comments
Changeset: 974ef554 Author: Jaikiran Pai <jpai@openjdk.org> Date: 2022-03-06 08:16:39 +0000 URL: https://git.openjdk.java.net/jdk/commit/974ef5542fe52f9cb8ffd8751df8a020bca503c9
06-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7680 Date: 2022-03-03 16:13:37 +0000
03-03-2022