Use StandardCharsets constants

MSAL

Replaces 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.UseStandardCharset
mod run . --recipe=org.openrewrite.staticanalysis.UseStandardCharset

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