RFR: 8376277: Migrate java/lang/reflect tests away from TestNG [v2]

Chen Liang liach at openjdk.org
Mon Jan 26 14:36:11 UTC 2026


On Mon, 26 Jan 2026 09:18:33 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:

>> test/jdk/java/lang/reflect/IllegalArgumentsTest.java line 28:
>> 
>>> 26:  * @bug 8277964
>>> 27:  * @summary Test IllegalArgumentException be thrown when an argument is invalid
>>> 28:  * @run junit/othervm/timeout=720 IllegalArgumentsTest
>> 
>> On the surface, the test is begging to use assertThrows but this a test for a C2 issue so I agree it shouldn't be changed.
>
>> On the surface, the test is begging to use assertThrows but this a test for a C2 issue so I agree it shouldn't be changed.
> 
> Then perhaps a comment documenting this decision would be helpful to future maintainers who may be tempted to improve the test using `assertThrows`.

Added a `@comment` tag describing the rationale for not using framework utilities in both `IllegalArgumentsTest` and `ChainedReflection`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29405#discussion_r2727821115


More information about the core-libs-dev mailing list