diff --git a/java/debugger/impl/src/com/intellij/debugger/memory/utils/StackFrameItem.java b/java/debugger/impl/src/com/intellij/debugger/memory/utils/StackFrameItem.java index c23eb3499415..7ab32c520236 100644 --- a/java/debugger/impl/src/com/intellij/debugger/memory/utils/StackFrameItem.java +++ b/java/debugger/impl/src/com/intellij/debugger/memory/utils/StackFrameItem.java @@ -90,8 +90,9 @@ public class StackFrameItem { public static List createFrames(@NotNull SuspendContextImpl suspendContext, boolean withVars) throws EvaluateException { ThreadReferenceProxyImpl threadReferenceProxy = suspendContext.getThread(); if (threadReferenceProxy != null) { - List res = new ArrayList<>(); - for (StackFrameProxyImpl frame : threadReferenceProxy.forceFrames()) { + List frameProxies = threadReferenceProxy.forceFrames(); + List res = new ArrayList<>(frameProxies.size()); + for (StackFrameProxyImpl frame : frameProxies) { try { List vars = null; Location location = frame.location();