Skip to content

Use Set.of() instead of new HashSet<>(Arrays.asList()) in MetadataConstraints. #2040

@keith-turner

Description

@keith-turner

Java recently introduced the Set.of() static methods for creating immutable sets. These new methods could be used here and here instead of new HashSet<>(Arrays.asList(. This would shorten the code and make the sets immutable, which seems to be the intention of the code.

Metadata

Metadata

Assignees

Labels

good first issueWell written issue that is very specific and easy to do, intended for first time contributors.

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions