You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation in Preferences is that the project settings are a list. The invariant of "one project in this collection" is manually enforced with getOrCreateProjectSetting. However, we can better use Map here (and implement the corresponding equals/hashcode) to let the collection do this for us. That way we can make sure we always have one by retrieving it directly from https://docs.oracle.com/javase/8/docs/api/java/util/Map.html#getOrDefault-java.lang.Object-V- and put the value whenever we need it.
The text was updated successfully, but these errors were encountered:
The current implementation in
Preferences
is that the project settings are a list. The invariant of "one project in this collection" is manually enforced withgetOrCreateProjectSetting
. However, we can better useMap
here (and implement the corresponding equals/hashcode) to let the collection do this for us. That way we can make sure we always have one by retrieving it directly from https://docs.oracle.com/javase/8/docs/api/java/util/Map.html#getOrDefault-java.lang.Object-V- and put the value whenever we need it.The text was updated successfully, but these errors were encountered: