RFR: 8304585: Method::invoke rewraps InvocationTargetException if a caller-sensitive method throws IAE

Mandy Chung mchung at openjdk.org
Thu Mar 30 01:07:17 UTC 2023


On Thu, 30 Mar 2023 00:50:11 GMT, Chen Liang <liach at openjdk.org> wrote:

>> not following what you mean.  Can you elaborate?
>
> Though very unlikely, I recommend adding a line of `Assertions.fail("Should not reach here");` after the `m.invoke` and before the catch to ensure the invocation always throw `InvocationTargetException`.

I see what you mean.  They should always throw.  I could add assert.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13233#discussion_r1152630640


More information about the core-libs-dev mailing list