On Wed, 2 Dec 2026 13:16:18 GMT, Jaikiran Pai <[email protected]> wrote:

>> Timofei Fedotov has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Address ZIP64 regression test review comments
>
> test/jdk/java/util/zip/ZipFile/NegativeZip64CentralDirectorySize.java line 29:
> 
>> 27:  * @summary Reject negative ZIP64 central directory sizes and offsets
>> 28:  * @modules jdk.zipfs
>> 29:  * @run junit NegativeZip64CentralDirectorySize
> 
> Hello @Sovtouch, for newer tests we have been using the `${test.main.class}` 
> construct:
> 
> @run junit ${test.main.class}
> 
> That helps prevent copy/paste issues in these test definitions, when the 
> `@run` test action unintentionally points to some other class than the 
> current one where the test definition resides.

Done.

> test/jdk/java/util/zip/ZipFile/NegativeZip64CentralDirectorySize.java line 77:
> 
>> 75: 
>> 76:     @TempDir
>> 77:     Path tempDir;
> 
> For jtreg tests, the jtreg framework manages temporary scratch directories 
> for each test. That scratch directory is the "current working directory" with 
> which the test gets launched. So whenever creating a temporary 
> directory/file, you can always use the current working directory as the 
> parent directory and jtreg will then manage the cleanup of that directory 
> appropriately.
> 
> So this usage of `@TempDir` isn't strictly necessary and the call sites in 
> this test can use something like:
> 
> 
> return Files.write(Path.of("negative-zip64.zip"), archive(negativeOffset));
> 
> instead of 
> 
> 
> return Files.write(tempDir.resolve("negative-zip64.zip"), 
> archive(negativeOffset));

Done.

> test/jdk/java/util/zip/ZipFile/NegativeZip64CentralDirectorySize.java line 
> 124:
> 
>> 122:     @ParameterizedTest
>> 123:     @ValueSource(booleans = {false, true})
>> 124:     public void zipFile(boolean negativeOffset) throws IOException {
> 
> A different test method name like `testZipFile` along with a brief comment on 
> the test method stating what the test does with the `java.util.zip.ZipFile` 
> would be better.
> 
> Same comment for the rest of the test methods.

Done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/34122#discussion_r4770657234
PR Review Comment: https://git.openjdk.org/jdk/pull/34122#discussion_r4770659401
PR Review Comment: https://git.openjdk.org/jdk/pull/34122#discussion_r4770660191

Reply via email to