mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
java null argument indexing: do not increment index after creation
GitOrigin-RevId: 086661cd6544e6f4ce8e8451289378d4694f2b4f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
593cc6f022
commit
07353a7229
+3
-4
@@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user