RFR: 8342040: Further improve entry lookup performance for multi-release JARs [v3]

Claes Redestad redestad at openjdk.org
Wed Oct 30 16:20:12 UTC 2024


On Wed, 30 Oct 2024 16:14:48 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

>> Eirik Bjørsnøs has updated the pull request incrementally with four additional commits since the last revision:
>> 
>>  - Map versions by entry name hashcode instead of by entry name. This avoids String allocation and storage
>>  - Merge pull request #1 from cl4es/bitset_versions
>>    
>>    Use BitSet to streamline construction
>>  - Fix traversal, traverse backwards to pick latest applicable version
>>  - Use BitSet to streamline construction
>
> src/java.base/share/classes/java/util/zip/ZipFile.java line 1798:
> 
>> 1796:                                 metaVersions.computeIfAbsent(hashCode, _ -> new BitSet()).set(version);
>> 1797:                             } catch (Exception e) {
>> 1798:                                 throw new IllegalArgumentException(e);
> 
> Hello Eirik, I'm late to this to PR. Was throwing an unspecified `IllegalArgumentException` from here intentional? Should it have been `IOException` instead?

@eirbjo will know for sure but I think it's intentional since if there's an encoding error we'd have thrown earlier when hashing over the full name.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21489#discussion_r1822973057


More information about the core-libs-dev mailing list