From 85b4c00117649e9f6a6332c9cd3d57573cf3c5b9 Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Thu, 11 Nov 2010 10:41:14 +0300 Subject: [PATCH] fix java.lang.IndexOutOfBoundsException: Wrong line; --- .../intellij/debugger/actions/SmartStepIntoActionHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/SmartStepIntoActionHandler.java b/java/debugger/impl/src/com/intellij/debugger/actions/SmartStepIntoActionHandler.java index d656c0712124..3786d50a9f8c 100644 --- a/java/debugger/impl/src/com/intellij/debugger/actions/SmartStepIntoActionHandler.java +++ b/java/debugger/impl/src/com/intellij/debugger/actions/SmartStepIntoActionHandler.java @@ -97,7 +97,9 @@ public class SmartStepIntoActionHandler extends DebuggerActionHandler { } final Document doc = FileDocumentManager.getInstance().getDocument(vFile); - + if (line >= doc.getLineCount()) { + return Collections.emptyList(); // the document has been changed + } final int startOffset = doc.getLineStartOffset(line); final TextRange lineRange = new TextRange(startOffset, doc.getLineEndOffset(line)); final int offset = CharArrayUtil.shiftForward(doc.getCharsSequence(), startOffset, " \t");