On Thu, 22 May 2025 01:29:12 GMT, Henry Jen <henry...@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 incrementally with one additional > commit since the last revision: > > Validator to take a file, use term JAR file test/jdk/tools/jar/ValidatorTest.java line 224: > 222: > 223: @Test > 224: public void testValidateJar() throws IOException { Perhaps rename the method to `testValidJar()`? test/jdk/tools/jar/ValidatorTest.java line 230: > 228: jar("--validate --file " + zip.toString()); > 229: } catch (IOException e) { > 230: fail("Expecting zero exit code"); I think we should remove the try/catch block and let the IOException propagate. That way, if htis fails for whatever reason, we get the entire exception stacktrace. A comment before the `jar("--validate --file ...)` line can say that we except the `jar()` call to succeed with a zero exit code. test/jdk/tools/jar/ValidatorTest.java line 235: > 233: > 234: @Test > 235: public void testValidate() throws IOException { Perhaps rename to `testMultiManifestJar()`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24430#discussion_r2102361183 PR Review Comment: https://git.openjdk.org/jdk/pull/24430#discussion_r2102359049 PR Review Comment: https://git.openjdk.org/jdk/pull/24430#discussion_r2102361579