Prefer if/throw over Guava's checkArgument and checkState
MSALReplace Guava's Preconditions.checkArgument(..) and Preconditions.checkState(..) statements with an if that throws IllegalArgumentException or IllegalStateException. A message template converts to String.format(..) only when it is a string literal whose placeholders are all %s and match the arguments.
org. openrewrite. java. migrate. guava. NoGuavaPreconditionsCheckArgumentAndStatemod run . --recipe= org. openrewrite. java. migrate. guava. NoGuavaPreconditionsCheckArgumentAndStateInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.