mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't check string content when comparing states (IDEA-219169)
states are used as keys only in state loop prevention, it should be enough to check whether they use same string or not GitOrigin-RevId: 86c19587537e12c77ff5eac55bedce0ba344ec83
This commit is contained in:
committed by
intellij-monorepo-bot
parent
780332cab5
commit
124c3ffe0c
+7
-2
@@ -52,11 +52,16 @@ class TextMateLexerState implements LexerState {
|
||||
return syntaxRule.equals(state.syntaxRule) &&
|
||||
matchData.equals(state.matchData) &&
|
||||
priorityMatch == state.priorityMatch &&
|
||||
Objects.equals(string, state.string);
|
||||
stringId() == state.stringId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(syntaxRule, matchData, priorityMatch, string);
|
||||
return Objects.hash(syntaxRule, matchData, priorityMatch, stringId());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private Object stringId() {
|
||||
return string != null ? string.id : null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user