Prefer java.util.Base64 instead of sun.misc

MSAL

Prefer java.util.Base64 instead of using sun.misc in Java 8 or higher. sun.misc is not exported by the Java module system and accessing this class will result in a warning in Java 11 and an error in Java 17.

org.openrewrite.java.migrate.UseJavaUtilBase64

Optional

The package of the BASE64Encoder and BASE64Decoder classes to replace.

useMimeCoderboolean

Use Base64.getMimeEncoder()/getMimeDecoder() instead of Base64.getEncoder()/getDecoder().

mod run . --recipe=org.openrewrite.java.migrate.UseJavaUtilBase64

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