Skip to content

Recipes to replace Guava Immutable{Set|List|Map}.copyOf() with Java {Set|List|Map}.copyOf()#585

Closed
knutwannheden wants to merge 2 commits intomainfrom
knutwannheden/add-immutable-copyof-recipes
Closed

Recipes to replace Guava Immutable{Set|List|Map}.copyOf() with Java {Set|List|Map}.copyOf()#585
knutwannheden wants to merge 2 commits intomainfrom
knutwannheden/add-immutable-copyof-recipes

Conversation

@knutwannheden
Copy link
Copy Markdown
Contributor

@knutwannheden knutwannheden commented Oct 20, 2024

Fixes #584

Implement recipes to replace Guava Immutable{Set|List|Map}.copyOf() calls with Java {Set|List|Map}.copyOf() calls.

  • Add AbstractNoGuavaImmutableCopyOf abstract class to handle the logic for replacing copyOf() calls.
  • Add NoGuavaImmutableSetCopyOf, NoGuavaImmutableListCopyOf, and NoGuavaImmutableMapCopyOf classes extending AbstractNoGuavaImmutableCopyOf.
  • Update no-guava.yml to include the new recipes.
  • Add test cases for NoGuavaImmutableSetCopyOf, NoGuavaImmutableListCopyOf, and NoGuavaImmutableMapCopyOf.

For more details, open the Copilot Workspace session.

…yOf(), and ImmutableMap.copyOf() with Java Set.copyOf(), List.copyOf(), and Map.copyOf()

Fixes #584

Implement recipes to replace Guava `Immutable{Set|List|Map}.copyOf()` calls with Java `{Set|List|Map}.copyOf()` calls.

* Add `AbstractNoGuavaImmutableCopyOf` abstract class to handle the logic for replacing `copyOf()` calls.
* Add `NoGuavaImmutableSetCopyOf`, `NoGuavaImmutableListCopyOf`, and `NoGuavaImmutableMapCopyOf` classes extending `AbstractNoGuavaImmutableCopyOf`.
* Update `no-guava.yml` to include the new recipes.
* Add test cases for `NoGuavaImmutableSetCopyOf`, `NoGuavaImmutableListCopyOf`, and `NoGuavaImmutableMapCopyOf`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/openrewrite/rewrite-migrate-java/issues/584?shareId=XXXX-XXXX-XXXX-XXXX).
@knutwannheden knutwannheden changed the title Add recipes to replace Guava ImmutableSet.copyOf(), ImmutableList.copyOf(), and ImmutableMap.copyOf() with Java Set.copyOf(), List.copyOf(), and Map.copyOf() Recipes to replace Guava Immutable{Set|List|Map}.copyOf() with Java {Set|List|Map}.copyOf() Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Recipes to replace Guava Immutable{Set|List|Map}.copyOf() calls with Java {Set|List|Map}.copyOf() calls

1 participant