E533 Remove usage of Guava Collections in WindowBuilder Core #270 by ptziegler · Pull Request #658 · eclipse-windowbuilder/windowbuilder · GitHub
[go: up one dir, main page]

Skip to content

Remove usage of Guava Collections in WindowBuilder Core #270#658

Merged
ptziegler merged 1 commit intoeclipse-windowbuilder:masterfrom
ptziegler:remove-guava-from-wb-core
Dec 12, 2023
Merged

Remove usage of Guava Collections in WindowBuilder Core #270#658
ptziegler merged 1 commit intoeclipse-windowbuilder:masterfrom
ptziegler:remove-guava-from-wb-core

Conversation

@ptziegler
Copy link
Contributor

In almost all cases, the call of Lists.newArrayList() can be simply replaced with new ArrayList<>().

Occasionally, we use Arrays.asList() to create lists from arrays. But care has to be taken here, because those lists are read-only. If values are written to them afterwards, the constructed list is passed as an argument to an ArrayList.
Note that we use Arrays.asList() instead of List.of(), as latter doesn't allow null elements.

The MapMaker class which is used to create maps with weak keys/values are replaced by the ReferenceMap.

The Multimap class is replaced by the MultiValueMap.

…wbuilder#270

In almost all cases, the call of Lists.newArrayList() can be simply
replaced with new ArrayList<>().

Occasionally, we use Arrays.asList() to create lists from arrays. But
care has to be taken here, because those lists are read-only. If values
are written to them afterwards, the constructed list is passed as an
argument to an ArrayList.
Note that we use Arrays.asList() instead of List.of(), as latter doesn't
allow null elements.

The MapMaker class which is used to create maps with weak keys/values
are replaced by the ReferenceMap.

The Multimap class is replaced by the MultiValueMap.
@ptziegler ptziegler added this to the 1.15.0 milestone Dec 11, 2023
@github-actions
Copy link

Unit Test Results

         4 files           4 suites   1h 20m 20s ⏱️
  7 071 tests   6 881 ✔️ 190 💤 0
28 284 runs  27 520 ✔️ 764 💤 0

Results for commit de94b19.

@ptziegler ptziegler merged commit 8b4801b into eclipse-windowbuilder:master Dec 12, 2023
@ptziegler ptziegler deleted the remove-guava-from-wb-core branch December 12, 2023 05:19
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

0