-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b89
-
generic
-
generic
-
Verified
Attached test suspend debugee VM in void method and try call ThreadReference.forceEarlyReturn with PrimitiveValue and ObjectReference and expect InvalidTypeException. When call forceEarlyReturn with PrimitiveValue it throws unexpected ClassCastException.
Test output:
Waiting for event by request:
breakpoint request ForceReturnInvalidTypeTest_Debuggee:14 (enabled)
Got requested event:
BreakpointEvent@ForceReturnInvalidTypeTest_Debuggee:14 in thread main
Call forceEarlyReturn with 0
Unexpected exception: java.lang.ClassCastException: com.sun.tools.jdi.VoidTypeImpl cannot be cast to com.sun.tools.jdi.PrimitiveTypeImpl
java.lang.ClassCastException: com.sun.tools.jdi.VoidTypeImpl cannot be cast to com.sun.tools.jdi.PrimitiveTypeImpl
at com.sun.tools.jdi.PrimitiveValueImpl.convertForAssignmentTo(PrimitiveValueImpl.java:93)
at com.sun.tools.jdi.PrimitiveValueImpl.prepareForAssignmentTo(PrimitiveValueImpl.java:79)
at com.sun.tools.jdi.ValueImpl.prepareForAssignment(ValueImpl.java:30)
at com.sun.tools.jdi.ThreadReferenceImpl.forceEarlyReturn(ThreadReferenceImpl.java:509)
at ForceReturnInvalidTypeTest.main(ForceReturnInvalidTypeTest.java:181)
Call
Waiting for event by request:
breakpoint request ForceReturnInvalidTypeTest_Debuggee:14 (enabled)
Got requested event:
BreakpointEvent@ForceReturnInvalidTypeTest_Debuggee:14 in thread main
Call forceEarlyReturn with instance of java.lang.Object(id=32)
Expected com.sun.jdi.InvalidTypeException: Can't assign object value to primitive
<comment deleted - it was a copy/paste from 6431720.
See next comment for proper description.
Failing test names:
nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn001
nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn006
nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn007
Test output:
Waiting for event by request:
breakpoint request ForceReturnInvalidTypeTest_Debuggee:14 (enabled)
Got requested event:
BreakpointEvent@ForceReturnInvalidTypeTest_Debuggee:14 in thread main
Call forceEarlyReturn with 0
Unexpected exception: java.lang.ClassCastException: com.sun.tools.jdi.VoidTypeImpl cannot be cast to com.sun.tools.jdi.PrimitiveTypeImpl
java.lang.ClassCastException: com.sun.tools.jdi.VoidTypeImpl cannot be cast to com.sun.tools.jdi.PrimitiveTypeImpl
at com.sun.tools.jdi.PrimitiveValueImpl.convertForAssignmentTo(PrimitiveValueImpl.java:93)
at com.sun.tools.jdi.PrimitiveValueImpl.prepareForAssignmentTo(PrimitiveValueImpl.java:79)
at com.sun.tools.jdi.ValueImpl.prepareForAssignment(ValueImpl.java:30)
at com.sun.tools.jdi.ThreadReferenceImpl.forceEarlyReturn(ThreadReferenceImpl.java:509)
at ForceReturnInvalidTypeTest.main(ForceReturnInvalidTypeTest.java:181)
Call
Waiting for event by request:
breakpoint request ForceReturnInvalidTypeTest_Debuggee:14 (enabled)
Got requested event:
BreakpointEvent@ForceReturnInvalidTypeTest_Debuggee:14 in thread main
Call forceEarlyReturn with instance of java.lang.Object(id=32)
Expected com.sun.jdi.InvalidTypeException: Can't assign object value to primitive
<comment deleted - it was a copy/paste from 6431720.
See next comment for proper description.
Failing test names:
nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn001
nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn006
nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn007
- relates to
-
JDK-7113357 InvalidTypeException is not thrown when boolean passed instead of double
- Closed