Release Note: JDI spec clarifications and implementation changes regarding when OpaqueFrameException and NativeMethodException are thrown

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Delivered
    • Priority: P4
    • 26
    • Affects Version/s: 26
    • Component/s: core-svc
    • 26

      [ThreadReference.popFrames()] and [ThreadReference.forceEarlyReturn()] were previously documented as only throwing `OpaqueFrameException` for virtual threads, indicating that the functionality cannot be performed on the virtual thread frame for a reason that is unique to virtual threads.

      However, it was realized that there were error conditions that resulted in a `NativeMethodException` when in fact the underlying error was not due to a native method, and was not unique to virtual threads. The appropriate exception in this case would be an `OpaqueFrameException `instead of a `NativeMethodException.`

      Both these APIs have now been updated to be consistent with when these two exceptions are thrown for both virtual threads and platform threads. This means you may now see these two APIs throw `OpaqueFrameException` for a platform thread when previously this was not possible.

            Assignee:
            Chris Plummer
            Reporter:
            Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: