RFR: 8376277: Migrate java/lang/reflect tests away from TestNG
Chen Liang
liach at openjdk.org
Mon Jan 26 13:54:26 UTC 2026
On Mon, 26 Jan 2026 06:39:30 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:
> If you look into the implementation of `Asssertions.assertThrows`, the only reflection happening is the call to `Class.isInstance` to check the expected exception type.
The primary problem is NOT due to the implementation in the utility. It is due to the different code structure (and compiler artifacts, such as lambdas) generating different stack trace and potentially more exception wrapping. Such differences could be crucial to core reflection `Method.invoke` behavior or JVM decisions.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29405#issuecomment-3799727304
More information about the core-libs-dev
mailing list