RFR: JDK-8317920: JDWP-agent sends broken exception event with onthrow option [v8]
Serguei Spitsyn
sspitsyn at openjdk.org
Wed Oct 18 23:51:50 UTC 2023
On Wed, 18 Oct 2023 21:48:33 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:
>> Fix `onthrow` issue by passing the event info to the `initialize` method.
>>
>> This prevents `jdb` from receiving a broken exception event and throwing an internal NullPointerException, upon attaching to the JDWP-agent.
>
> Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision:
>
> Add suggested fixes
test/jdk/com/sun/jdi/JdwpOnThrowTest.java line 94:
> 92: if (!ex.exception().type().name().equals("Ex")) {
> 93: throw new RuntimeException("Exception has wrong type: " + ex.exception().type().name());
> 94: }
Not a review but just a suggestion to refactor a little bit:
The lines 75-94 can be placed into a method `verifyExceptionEvent(ExceptionEvent ex)`,
so the `main()` method is smaller and better observable.
Not pressure though, it is up to you.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16145#discussion_r1364698631
More information about the serviceability-dev
mailing list