RFR: 8350704: Create tests to ensure the failure behavior of core reflection APIs [v2]

Chen Liang liach at openjdk.org
Mon Mar 24 21:29:29 UTC 2025


On Thu, 27 Feb 2025 17:41:48 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Core reflection's generic signature parsing system is used for many aspects, including annotations and enclosing methods, yet it is under-tested. It is better for us to set up tests to ensure that sensitive error behaviors of core reflection remain the same across implementation updates, such as #19281.
>> 
>> This patch also includes a JUnit converted version of https://github.com/openjdk/jdk/pull/22581#issuecomment-2521703511 test checking behavior around annotations with duplicate interfaces. Interesting that this causes failure in class, field, and methods (constructors), but not in parameters.
>> 
>> Testing: jdk-tier 1, jdk-tier 2
>
> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove useless directive

Added comments and reran "jdk/java/lang/Class jdk/java/lang/annotation jdk/java/lang/reflect/Generics" tests.

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

PR Comment: https://git.openjdk.org/jdk/pull/23788#issuecomment-2749437586


More information about the core-libs-dev mailing list