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

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

Closed

Conversation

knutwannheden
Copy link
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