From a78f80daabf2b0fe0e3c4c273adb86deb77c9d72 Mon Sep 17 00:00:00 2001 From: Oleg Sukhodolsky Date: Mon, 9 Dec 2013 17:58:29 +0400 Subject: [PATCH] condition replaced with assertion which checks contract expectation --- .../codeInsight/editorActions/moveUpDown/MoverWrapper.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/moveUpDown/MoverWrapper.java b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/moveUpDown/MoverWrapper.java index 556a53985ad6..add65b485710 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/moveUpDown/MoverWrapper.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/moveUpDown/MoverWrapper.java @@ -45,9 +45,7 @@ class MoverWrapper { } public final void move(Editor editor, final PsiFile file) { - if (myInfo.toMove2 == null) { - return; - } + assert myInfo.toMove2 != null; myMover.beforeMove(editor, myInfo, myIsDown); final Document document = editor.getDocument(); final int start = StatementUpDownMover.getLineStartSafeOffset(document, myInfo.toMove.startLine);