Prefer the Java standard library instead of Apache Commons
MSALPrefer the Java standard library instead of Apache Commons. These recipes replace various Apache Commons utilities with their JDK equivalents, where available in Java 11+.
org. openrewrite. apache. commons. PreferJavaStandardLibrarymod run . --recipe= org. openrewrite. apache. commons. PreferJavaStandardLibraryInstall 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.
- Prefer
java.util.Base64 ApacheCommonsFileUtilsRefaster recipes- Prefer
java.nio.file.Files - Prefer
java.nio.charset.StandardCharsets - Prefer
System.lineSeparator() ApacheCommonsStringUtilsRefaster recipes- Replace StringUtils#defaultIfBlank(String, String) with JDK equivalent
- Replace any StringUtils#isBlank(String) and #isNotBlank(String)
- Replace any StringUtils#isEmpty(String) and #isNotEmpty(String)
- Prefer
java.nio.charset.StandardCharsets