RFR: 8260010: UTF8ZipCoder not thread-safe since JDK-8243469 [v2]

Claes Redestad redestad at openjdk.java.net
Wed Jan 20 13:03:04 UTC 2021

> This patch resolves a thread-safety issue where the singleton UTF8ZipCoder is erroneously using a shared CharsetDecoder when the fast-path fails. It needs to go via JLA.newStringUTF8NoRepl like before JDK-8243469
> This should resolve a rare issue when doing a lot of jar scanning in parallel on jar/zip files (with at least some non-ASCII entries), but I've not managed to create a test that reliably reproduce the issue.

Claes Redestad has updated the pull request incrementally with three additional commits since the last revision:

 - Reuse normalizedHash(String)
 - copyright
 - Don't use No Replace variant to calculate hash, more fixes


  - all: https://git.openjdk.java.net/jdk/pull/2163/files
  - new: https://git.openjdk.java.net/jdk/pull/2163/files/4eeb06ea..dd7ef567

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

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

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

More information about the core-libs-dev mailing list