Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use JDK classes instead of Guava to create immutable collections #615

Conversation

ptziegler
Copy link
Contributor

Java itself is powerful enough to express immutability. There is no need to keep using Guava for this. This change removes all usages of ImmutableList, ImmutableSet and ImmutableMap and replaces them with List, Set, Map and the Collections utility class.

Example:
ImmutableList.copyOf(...) -> List.copyOf(...)
ImmutableMap.of(...) -> Map.of(...)
ImmutableSet.of() -> Collections.emptySet()

#270

@ptziegler ptziegler added this to the 1.14.0 milestone Oct 30, 2023
@github-actions
Copy link

github-actions bot commented Oct 30, 2023

Unit Test Results

         4 files           4 suites   2h 28m 0s ⏱️
  7 651 tests   7 448 ✔️ 203 💤 0
30 604 runs  29 792 ✔️ 812 💤 0

Results for commit e214d67.

♻️ This comment has been updated with latest results.

Java itself is powerful enough to express immutability. There is no need
to keep using Guava for this. This change removes all usages of
ImmutableList, ImmutableSet and ImmutableMap and replaces them with
List, Set, Map and the Collections utility class.

Example:
ImmutableList.copyOf(...) -> List.copyOf(...)
ImmutableMap.of(...) -> Map.of(...)
ImmutableSet.of() -> Collections.emptySet()
@ptziegler ptziegler force-pushed the replace-guava-immutable-collections branch from 19d75fa to e214d67 Compare October 31, 2023 11:33
@ptziegler ptziegler merged commit 2e1fc17 into eclipse-windowbuilder:master Nov 1, 2023
7 checks passed
@ptziegler ptziegler deleted the replace-guava-immutable-collections branch November 1, 2023 11:11
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.

None yet

1 participant