Prefer java.nio.charset.StandardCharsets

MSAL

Prefer java.nio.charset.StandardCharsets instead of using com.google.common.base.Charsets.

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

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

Recipe list

It runs these recipes, in this order.

  1. Change type Charsets to StandardCharsets