RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v15]

Jaikiran Pai jpai at openjdk.org
Wed May 28 11:38:03 UTC 2025


On Tue, 27 May 2025 16:23:47 GMT, Henry Jen <henryjen at openjdk.org> wrote:

>> This PR check the jar file to ensure entries are consistent from the central directory and local file header. Also check there is no duplicate entry names that could override the desired content by accident.
>
> Henry Jen has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 17 additional commits since the last revision:
> 
>  - Merge remote-tracking branch 'openjdk/master' into open
>  - Merge remote-tracking branch 'openjdk/master' into open
>  - Minor tweaks
>  - Assure >0 exit code and fix typos
>  - Validator to take a file, use term JAR file
>  - Mismatched order is considered invalid
>  - Adapt review feedback
>  - Address review feedback
>  - Adjust message based on review feedback
>  - Move all validation into EntryValidator, update the document
>  - ... and 7 more: https://git.openjdk.org/jdk/compare/7b533d89...2690e69f

The CSR has been approved and the current changes in this PR look good to me. 
There's a typo in a comment which I've added as a review comment.
There's a test-only addition where I don't fully understand the use of ISO_8859_1 charset. I haven't had a chance to look deeper at that but we can look into it separately at a later date since it doesn't directly relate to this enhancement nor does it introduce an issue.

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

Marked as reviewed by jpai (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24430#pullrequestreview-2874653370


More information about the compiler-dev mailing list