RFR: 8260010: UTF8ZipCoder not thread-safe since JDK-8243469

Claes Redestad redestad at openjdk.java.net
Wed Jan 20 12:28:54 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.


Commit messages:
 - UTF8ZipCoder.normalizedHash not thread-safe

Changes: https://git.openjdk.java.net/jdk/pull/2163/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2163&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8260010
  Stats: 7 lines in 1 file changed: 5 ins; 0 del; 2 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