RegExp: fix order of evaluation (IDEA-255232)

GitOrigin-RevId: 8dcb2cd7e9936b84f2fcdca7c60d7b1eae986ba9
This commit is contained in:
Bas Leijdekkers
2020-11-17 15:43:06 +01:00
committed by intellij-monorepo-bot
parent 6a68669ac6
commit 53f8a549d8

View File

@@ -503,13 +503,13 @@ public final class CheckRegExpForm {
setMatches(regExpFile, collectMatches(matcher)); setMatches(regExpFile, collectMatches(matcher));
return RegExpMatchResult.MATCHES; return RegExpMatchResult.MATCHES;
} }
else if (matcher.hitEnd()) {
return RegExpMatchResult.INCOMPLETE;
}
else if (matcher.find()) { else if (matcher.find()) {
setMatches(regExpFile, collectMatches(matcher)); setMatches(regExpFile, collectMatches(matcher));
return RegExpMatchResult.FOUND; return RegExpMatchResult.FOUND;
} }
else if (matcher.hitEnd()) {
return RegExpMatchResult.INCOMPLETE;
}
else { else {
return RegExpMatchResult.NO_MATCH; return RegExpMatchResult.NO_MATCH;
} }