IDEA-173353 Watch can't assign multi-dimensional array - workaround implemented

This commit is contained in:
Egor.Ushakov
2017-05-31 19:28:19 +03:00
parent b788d3ae90
commit 5e7d028a33
@@ -1067,6 +1067,16 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
}
}
// workaround for multi-array args bug in jdi calls
for (Value arg : myArgs) {
if (arg instanceof ArrayReference) {
Type type = arg.type();
while (type instanceof ArrayType) {
type = ((ArrayType)type).componentType(); // this will throw ClassNotLoadedException if necessary
}
}
}
if (!Patches.IBM_JDK_DISABLE_COLLECTION_BUG) {
// ensure args are not collected
StreamEx.of(myArgs).select(ObjectReference.class).forEach(DebuggerUtilsEx::disableCollection);