Recipes to replace Guava Immutable{Set|List|Map}.copyOf()
calls with Java {Set|List|Map}.copyOf()
calls
#584
Labels
enhancement
New feature or request
Since Java 10 the interfaces
Set
,List
, andMap
declare staticcopyOf()
methods which are equivalent to thecopyOf()
counterparts in Guava'sImmutableSet
,ImmutableList
, andImmutableMap
counterparts.Implement three imperative recipes which implement this migration. It would probably make sense to create an abstract supertype based on
AbstractNoGuavaImmutableOf
, so that the recipes can be declared as subtypes of that new abstract base class. As noted the precondition would be Java 10.There should be some test cases for this (again similarly to as how it was done for the implementations of
AbstractNoGuavaImmutableOf
) and finally the three new recipes should be added to the recipe list oforg.openrewrite.java.migrate.guava.NoGuavaJava11
which is declared inno-guava.yml
, where also the other three mentioned recipes are already declared.The text was updated successfully, but these errors were encountered: