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

Alan Bateman alanb at openjdk.java.net
Thu May 13 11:14:54 UTC 2021


On Thu, 13 May 2021 10:49: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

Changes requested by alanb (Reviewer).

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

> 92:         lib= null;
> 93:         builder=null;
> 94:     }

This looks like a workaround. Can you instead see if the fields can be changed to non-final and place the constructor with a method that has the `@BeforeClass` annotation?

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

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


More information about the core-libs-dev mailing list