RFR: JDK-8183372 : Refactor java/lang/Class shell tests to java

Brent Christian bchristi at openjdk.java.net
Thu Jan 21 05:21:54 UTC 2021

On Wed, 20 Jan 2021 17:27:43 GMT, Mahendra Chhipa <github.com+34924738+mahendrachhipa at openjdk.org> wrote:

> https://bugs.openjdk.java.net/browse/JDK-8183372

Can this be done all in `EnclosingClassTest.java`, without a new `RunEnclosingClassTest.java`?

Adding the `@BeforeClass` and `@AfterClass` methods to what's there, you may just need to 
change the `test()` calls to use reflection - something along the lines of: 

> test(`Class.forName("EnclosingClass").getDeclaredConstructor().newInstance());`


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

More information about the core-libs-dev mailing list