Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6431720

Unexpected InvalidTypeException when call ThreadReference.forceEarlyReturn with VoidValue

XMLWordPrintable

    • b89
    • generic
    • generic
    • Verified

      ThreadReference.forceEarlyReturn always throws com.sun.jdi.InvalidTypeException when call it with VoidValue when thread is suspended in method with void return type.

      Test is attached.

      Test output:

      Waiting for event by request:
      breakpoint request ForceReturnVoidTest_Debuggee:19 (enabled)
      Got requested event:
      BreakpointEvent@ForceReturnVoidTest_Debuggee:19 in thread main
      Create void value: <void value>
      Waiting for event by request:
      breakpoint request ForceReturnVoidTest_Debuggee:14 (enabled)
      Got requested event:
      BreakpointEvent@ForceReturnVoidTest_Debuggee:14 in thread main
      Unexpected exception: com.sun.jdi.InvalidTypeException
      com.sun.jdi.InvalidTypeException
      at com.sun.tools.jdi.VoidValueImpl.prepareForAssignmentTo(VoidValueImpl.java:36)
      at com.sun.tools.jdi.ValueImpl.prepareForAssignment(ValueImpl.java:30)
      at com.sun.tools.jdi.ThreadReferenceImpl.forceEarlyReturn(ThreadReferenceImpl.java:509)
      at ForceReturnVoidTest.main(ForceReturnVoidTest.java:218)
      Failing test names:
      nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn001
      nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn004
      nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn006
      nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn007

            jjh James Holmlund (Inactive)
            sboikovsunw Semen Boikov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: