RFR: 8267990: Revisit some uses of `synchronized` in the HttpClient API [v2]

Daniel Fuchs dfuchs at openjdk.java.net
Mon May 31 16:40:44 UTC 2021


> The Utils.remaining(List<ByteBuffer> list) method assumes that it can and should synchronize on the given list to prevent concurrent modification. In 99% of the cases this assumption is wrong. There's only one such list (the SSLFlowDelegate writeList) that requires this synchronization. 
> 
> Also the `SequentialScheduler.synchronizedScheduler` uses `synchronized`, it could use a Lock instead and this would make it possible to assert that there is no contention (since the logic of the SequentialScheduler is supposed to prevent contention from occurring at this place).

Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:

  8267990: Revisit some uses of `synchronized` in the HttpClient API

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/4275/files
  - new: https://git.openjdk.java.net/jdk/pull/4275/files/c2f49a5f..7d92e7bd

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4275&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4275&range=00-01

  Stats: 6 lines in 1 file changed: 3 ins; 0 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4275.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4275/head:pull/4275

PR: https://git.openjdk.java.net/jdk/pull/4275



More information about the security-dev mailing list