From c6798d330efa33b49232352cfd7589a1defc8373 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Tue, 12 Jul 2016 18:18:50 +0300 Subject: [PATCH] made more inlinable --- platform/util/src/com/intellij/openapi/util/TextRange.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/platform/util/src/com/intellij/openapi/util/TextRange.java b/platform/util/src/com/intellij/openapi/util/TextRange.java index e3cfceb31e35..e051f77ed66f 100644 --- a/platform/util/src/com/intellij/openapi/util/TextRange.java +++ b/platform/util/src/com/intellij/openapi/util/TextRange.java @@ -218,11 +218,8 @@ public class TextRange implements Segment, Serializable { } public static void assertProperRange(int startOffset, int endOffset, @NotNull Object message) { - if (startOffset > endOffset) { + if (startOffset > endOffset || startOffset < 0) { LOG.error("Invalid range specified: (" + startOffset + "," + endOffset + "); " + message); } - if (startOffset < 0) { - LOG.error("Negative start offset: (" + startOffset + "," + endOffset + "); " + message); - } } }