From 5e7d028a33aacefd5fe464f24cfadba43017d5f8 Mon Sep 17 00:00:00 2001 From: "Egor.Ushakov" Date: Wed, 31 May 2017 19:25:40 +0300 Subject: [PATCH] IDEA-173353 Watch can't assign multi-dimensional array - workaround implemented --- .../com/intellij/debugger/engine/DebugProcessImpl.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java b/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java index 1f1d990734b1..9d6e0ccb8ad4 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java @@ -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);