java null argument indexing: do not increment index after creation

GitOrigin-RevId: 086661cd6544e6f4ce8e8451289378d4694f2b4f
This commit is contained in:
Dmitry Batkovich
2019-06-12 14:12:30 +03:00
committed by intellij-monorepo-bot
parent 593cc6f022
commit 07353a7229
@@ -86,11 +86,8 @@ public class JavaNullMethodArgumentIndex extends ScalarIndexExtension<JavaNullMe
}
private static boolean containsStopSymbol(int startIndex, @NotNull CharSequence text, boolean leftDirection) {
int i = startIndex;
int i = leftDirection ? startIndex - 1 : startIndex + 1;
while (true) {
if (leftDirection) i--; else i++;
if (leftDirection) {
if (i < 0) return false;
} else {
@@ -102,6 +99,8 @@ public class JavaNullMethodArgumentIndex extends ScalarIndexExtension<JavaNullMe
if (!Lazy.WHITE_SPACE_OR_EOL_SYMBOLS.contains(c) && !Character.isWhitespace(c)) {
return false;
}
if (leftDirection) i--; else i++;
}
}