Skip to content

Change collection type of projectsettings to Map #300

@TimvdLippe

Description

@TimvdLippe

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions