On Thu, 13 May 2021 10:49:21 GMT, Lance Andersen <lan...@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

The non-static state in this test class is initialized for each of the static 
testXXX scenarios. An alternative could be to move said state (four fields) 
into a static inner class, and have each of the testXXX scenarios create an 
instance of that class with the test-specific path. That would also allow the 
addition of the no-args public constructor to HashesTest, and the testXXX 
methods to be made non-static.

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

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

Reply via email to