File tree 1 file changed +5
-3
lines changed
src/jdk.jdi/share/classes/com/sun/tools/jdi
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -586,12 +586,14 @@ void validateAssignment(ValueContainer destination)
586
586
*/
587
587
588
588
JNITypeParser destSig = new JNITypeParser (destination .signature ());
589
- JNITypeParser sourceSig = new JNITypeParser (type ().signature ());
590
589
if (destSig .isPrimitive ()) {
591
590
throw new InvalidTypeException ("Can't assign object value to primitive" );
592
591
}
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
+ }
595
597
}
596
598
if (destSig .isVoid ()) {
597
599
throw new InvalidTypeException ("Can't assign object value to a void" );
You can’t perform that action at this time.
0 commit comments