On Thu, 19 Nov 2026 19:08:26 GMT, Chris Plummer <[email protected]> wrote:

> Adapt to [JDK-8395356](https://bugs.openjdk.org/browse/JDK-8395356), which 
> changed JVMTI to no longer support returning a clone for "this" when in a 
> constructor, and instead throwing JVMTI_ERROR_OPAQUE_FRAME. This is mostly a 
> spec update, with one minor (and not strictly necessary) code change. I still 
> need to work on test cases.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

test/jdk/com/sun/jdi/valhalla/CtorDebuggingTest.java line 60:

> 58: import com.sun.jdi.request.BreakpointRequest;
> 59: import com.sun.jdi.request.EventRequest;
> 60: import com.sun.jdi.request.EventRequestManager;

Nit: There following imports can be stale:

  import java.util.Arrays;
  import java.util.List;
  import java.util.Objects;

  import com.sun.jdi.Field;
  import com.sun.jdi.IntegerValue;
  import com.sun.jdi.ReferenceType;
  import com.sun.jdi.StackFrame;
  import com.sun.jdi.ThreadReference;
  import com.sun.jdi.event.ClassPrepareEvent;
  import com.sun.jdi.request.EventRequest;
  import com.sun.jdi.request.EventRequestManager;

test/jdk/com/sun/jdi/valhalla/CtorDebuggingTest.java line 228:

> 226:                             result = BreakpointResult.GOT_OFE;
> 227:                             throw new RuntimeException(e);
> 228:                         }

Q: The `OpaqueFrameException` is expected, is not it? Then why is a 
`RuntimeException` thrown?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33977#discussion_r4692955607
PR Review Comment: https://git.openjdk.org/jdk/pull/33977#discussion_r4692916250

Reply via email to