Check whether a Guava type can be replaced

MSAL

Useful as a precondition to skip over source files that call a method whose parameter needs the Guava type, or whose returned Guava type does not fit the Java type.

org.openrewrite.java.migrate.guava.DoesNotRequireGuavaType

Required

The fully qualified name of the Guava type to replace.

The fully qualified name of the Java standard library type that replaces it.

Optional

Method patterns of the calls that the same recipe list replaces with Java standard library calls, so these calls do not need the Guava type. Separate values with commas.

mod run . --recipe=org.openrewrite.java.migrate.guava.DoesNotRequireGuavaType \ -P guavaType=com.google.common.base.Optional \ -P javaType=java.util.Optional

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