RFR: 8266461: tools/jmod/hashes/HashesTest.java fails: static @Test methods [v3]

Mandy Chung mchung at openjdk.java.net
Thu May 13 19:00:09 UTC 2021


On Thu, 13 May 2021 18:37:21 GMT, Lance Andersen <lancea at openjdk.org> wrote:

>> HI all,
>> 
>> Please review the fix to HashesTest.java to support running on TestNG 7.4.  
>> 
>> The fix adds a no-arg constructor which TestNG requires.
>> 
>> The change allows the test to run with the current jtreg as well as the upcoming jtreg
>> 
>> 
>> Best
>> Lance
>
> Lance Andersen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update copyright typo

Looks like the imports and whitespace are changed by IDE??   can you please revert these unintentional change.

Otherwise, the change looks good.

test/jdk/tools/jmod/hashes/HashesTest.java line 90:

> 88:         }
> 89:         this.mods = dest.resolve("mods");
> 90:         Path srcDir = dest.resolve("src");

you can just get rid of this local variable and do this in line 92:

     this.builder = new ModuleInfoMaker(dest.resolve("src"));

test/jdk/tools/jmod/hashes/HashesTest.java line 387:

> 385:                 if (hashes != null) {
> 386:                     hashes.names().stream().sorted().forEach(n ->
> 387:                             System.out.format("  %s %s%n", n, toHex(hashes.hashFor(n)))

Nit: the extra whitespaces in line 384 and 387 may be added by IDE.  Can you revert it.

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

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


More information about the core-libs-dev mailing list