Skip to content

Conversation

@tbw777
Copy link
Contributor

@tbw777 tbw777 commented Jan 6, 2023

WARNING: this type of changes was made and can be made only on unmodifiable collections BENEFITS:

  1. Internal protected data. Example: LayerGeneratingProcessor.getSupportedAnnotationTypes() and similar return unmodifiable collections to protect content
  2. IDE side visual highlighting for values duplicates (for set/map)
  3. Less required imports
  4. Less mem usage
  5. Shortest form, for example: Collections.unmodifiableSet(new HashSet(Arrays.asList(new String[] {... this line might be replaced by Set.of()

…ap.of()

WARNING: this type of changes was made and can be made only on unmodifiable collections
BENEFITS:
1. Internal protected data. Example: LayerGeneratingProcessor.getSupportedAnnotationTypes() and similar return unmodifiable collections to protect content
2. IDE side visual highlighting for values duplicates (for set/map)
3. Less required imports
4. Less mem usage
5. Shortest form, for example:
Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(new String[] {...
this line might be replaced by Set.of()
@tbw777 tbw777 closed this Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant