8252933: com.sun.tools.jdi.ObjectReferenceImpl#validateAssignment always requests referenceType
Reviewed-by: cjplummer, amenkov
This commit is contained in:
parent
74851c507b
commit
65d6c10185
@ -586,12 +586,14 @@ public class ObjectReferenceImpl extends ValueImpl
|
||||
*/
|
||||
|
||||
JNITypeParser destSig = new JNITypeParser(destination.signature());
|
||||
JNITypeParser sourceSig = new JNITypeParser(type().signature());
|
||||
if (destSig.isPrimitive()) {
|
||||
throw new InvalidTypeException("Can't assign object value to primitive");
|
||||
}
|
||||
if (destSig.isArray() && !sourceSig.isArray()) {
|
||||
throw new InvalidTypeException("Can't assign non-array value to an array");
|
||||
if (destSig.isArray()) {
|
||||
JNITypeParser sourceSig = new JNITypeParser(type().signature());
|
||||
if (!sourceSig.isArray()) {
|
||||
throw new InvalidTypeException("Can't assign non-array value to an array");
|
||||
}
|
||||
}
|
||||
if (destSig.isVoid()) {
|
||||
throw new InvalidTypeException("Can't assign object value to a void");
|
||||
|
Loading…
x
Reference in New Issue
Block a user