On Mon, 26 Jan 2026 06:39:30 GMT, Eirik Bjørsnøs <[email protected]> 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
