Skip to content

Commit 65d6c10

Browse files
author
Daniil Titov
committed
8252933: com.sun.tools.jdi.ObjectReferenceImpl#validateAssignment always requests referenceType
Reviewed-by: cjplummer, amenkov
1 parent 74851c5 commit 65d6c10

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/jdk.jdi/share/classes/com/sun/tools/jdi/ObjectReferenceImpl.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -586,12 +586,14 @@ void validateAssignment(ValueContainer destination)
586586
*/
587587

588588
JNITypeParser destSig = new JNITypeParser(destination.signature());
589-
JNITypeParser sourceSig = new JNITypeParser(type().signature());
590589
if (destSig.isPrimitive()) {
591590
throw new InvalidTypeException("Can't assign object value to primitive");
592591
}
593-
if (destSig.isArray() && !sourceSig.isArray()) {
594-
throw new InvalidTypeException("Can't assign non-array value to an array");
592+
if (destSig.isArray()) {
593+
JNITypeParser sourceSig = new JNITypeParser(type().signature());
594+
if (!sourceSig.isArray()) {
595+
throw new InvalidTypeException("Can't assign non-array value to an array");
596+
}
595597
}
596598
if (destSig.isVoid()) {
597599
throw new InvalidTypeException("Can't assign object value to a void");

0 commit comments

Comments
 (0)