Use StandardCharsets constants
MSALReplaces Charset.forName(java.lang.String) with the equivalent StandardCharsets constant. Using the predefined constants is compile-time safe and avoids looking up by name the charsets that are guaranteed to exist on every JVM.
org. openrewrite. staticanalysis. UseStandardCharsetmod run . --recipe= org. openrewrite. staticanalysis. UseStandardCharsetInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.