Migrates to Apache Commons Lang 3.x
MSALMigrate applications to the latest Apache Commons Lang 3.x release. This recipe modifies application's build files, and changes the package as per the migration release notes.
org. openrewrite. apache. commons. lang. UpgradeApacheCommonsLang_2_3mod run . --recipe= org. openrewrite. apache. commons. lang. UpgradeApacheCommonsLang_2_3Install 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.
- Change Gradle or Maven dependency
commons-lang:commons-lang - Add a literal method argument 2 in methods
org.apache.commons.lang.ClassUtils isAssignable(Class, Class) - Add a literal method argument 2 in methods
org.apache.commons.lang.ClassUtils isAssignable(Class[], Class[]) - Migrate
WordUtilsto Apache Commons Text - Rename package name
org.apache.commons.langtoorg.apache.commons.lang3 - Change method name
org.apache.commons.lang3.exception.ExceptionUtils getFullStackTrace(..)togetStackTrace - Change type
NullArgumentExceptiontoNullPointerException - Change type
NestableExceptiontoException - Change type
NestableRuntimeExceptiontoRuntimeException - Change type
NestableErrortoError - Change type
org.apache.commons.lang3.NumberUtilstoorg.apache.commons.lang3.math.NumberUtils - Change type
org.apache.commons.lang3.math.RandomUtilstoorg.apache.commons.lang3.RandomUtils - Change method name
org.apache.commons.lang3.math.NumberUtils stringToInt(..)totoInt - Change method target to static
- Change method name
java.lang.Boolean toBooleanObject(boolean)tovalueOf - Change method target to static
- Change method name
org.apache.commons.lang3.StringEscapeUtils escapeHtml(String)toescapeHtml4 - Change method name
org.apache.commons.lang3.StringEscapeUtils unescapeHtml(String)tounescapeHtml4 - Change method name
org.apache.commons.lang3.StringEscapeUtils escapeJavaScript(String)toescapeEcmaScript - Change method name
org.apache.commons.lang3.StringEscapeUtils unescapeJavaScript(String)tounescapeEcmaScript - Replace
SystemUtils#isJavaVersionAtLeast(float)and(int)with theJavaVersionoverload - Migrate deprecated SystemUtils constants
- Prefer
java.nio.charset.StandardCharsets