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

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


On Wed, 20 Jan 2021 12:52:30 GMT, eirbjo <github.com+300291+eirbjo at openjdk.org> wrote:

>> 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
>
> src/java.base/share/classes/java/util/zip/ZipCoder.java line 229:
> 
>> 227:                     // Non-ASCII, fall back to decoding a String
>> 228:                     String s = JLA.newStringUTF8NoRepl(a, end - len, end);
>> 229:                     h = s.hashCode();
> 
> Would it be possible to call normalizedHash(String name) here?

Yes, updated. (The PR was supposed to be a draft until now since I was fixing up some testing issues with my first stab at this.)

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

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


More information about the core-libs-dev mailing list