EA-232881: More straightforward findOrRegister call

GitOrigin-RevId: d941b3f0f7abafa2af122406e75df8dfcef40f23
This commit is contained in:
Ivan Donchevskii
2020-09-29 07:56:21 +00:00
committed by intellij-monorepo-bot
parent 83ed89635e
commit 973449fef9
@@ -127,8 +127,9 @@ public class HighlightDisplayKey {
@NonNls @Nullable final String id) {
HighlightDisplayKey key = find(name);
if (key == null) {
key = register(name, displayName, id != null ? id : name);
assert key != null : name;
final String registrationId = id != null ? id : name;
key = new HighlightDisplayKey(name, registrationId);
ourKeyToDisplayNameMap.put(key, new Computable.PredefinedValueComputable<>(displayName));
}
return key;
}