On Mon, 16 Oct 2023 15:50:05 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:
>> Johannes Bechberger has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add test case > > test/jdk/com/sun/jdi/JdwpOnThrowTest.java line 86: > >> 84: if (ex.catchLocation() == null) { >> 85: throw new RuntimeException("Exception >> catch location is null"); >> 86: } > > One more thing you can check here. ExceptionEvent implements Locatable, which > has a location() API. That should return the same location as > ex.thread().frame(0).location(). `if (!ex.thread().frame(0).location().equals(ex.location())) {` causes an exception: java.lang.IllegalArgumentException: Invalid method id: 139869509179824 at jdk.jdi/com.sun.tools.jdi.ReferenceTypeImpl.getMethodMirror(ReferenceTypeImpl.java:127) at jdk.jdi/com.sun.tools.jdi.LocationImpl.method(LocationImpl.java:101) at jdk.jdi/com.sun.tools.jdi.LocationImpl.equals(LocationImpl.java:66) at JdwpOnThrowTest.main(JdwpOnThrowTest.java:92) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) at java.base/java.lang.Thread.run(Thread.java:1570) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16145#discussion_r1360927364