Keep the type arguments of Guava's collection factories

MSAL

Replace a Guava collection factory called with explicit type arguments, such as Lists.<String>newArrayList(), with the constructor and the same type arguments, new ArrayList<String>(). Where nothing gives the new collection a target type, a diamond would infer Object instead.

org.openrewrite.java.migrate.guava.NoGuavaCollectionFactoryTypeArguments
mod run . --recipe=org.openrewrite.java.migrate.guava.NoGuavaCollectionFactoryTypeArguments

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.