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

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


On Mon, 26 Jan 2026 08:37:10 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review remarks
>
> test/jdk/java/lang/reflect/ChainedReflection.java line 42:
> 
>> 40:     class Inner {
>> 41:         // JUnit does not allow test class to declare multiple constructors
>> 42:         Inner() throws ReflectiveOperationException {
> 
> This comment might be confusing to future maintainers,  may not immediately seeing the compiler generated constructor. Maybe expand the comment on this and put it on the class rather the constructor.

I have expanded this on `Inner` to:

> This inner class is declared with a constructor that ctorCallMethodInvoke
> reflects on. Such a constructor cannot be declared in ChainedReflection
> because JUnit does not allow a test class to declare multiple constructors.

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

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


More information about the core-libs-dev mailing list