Migrates to Apache Commons Lang 3.x

MSAL

Migrate 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_3
mod run . --recipe=org.openrewrite.apache.commons.lang.UpgradeApacheCommonsLang_2_3

Install 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.

  1. Change Gradle or Maven dependency commons-lang:commons-lang
  2. Add a literal method argument 2 in methods org.apache.commons.lang.ClassUtils isAssignable(Class, Class)
  3. Add a literal method argument 2 in methods org.apache.commons.lang.ClassUtils isAssignable(Class[], Class[])
  4. Migrate WordUtils to Apache Commons Text
  5. Rename package name org.apache.commons.lang to org.apache.commons.lang3
  6. Change method name org.apache.commons.lang3.exception.ExceptionUtils getFullStackTrace(..) to getStackTrace
  7. Change type NullArgumentException to NullPointerException
  8. Change type NestableException to Exception
  9. Change type NestableRuntimeException to RuntimeException
  10. Change type NestableError to Error
  11. Change type org.apache.commons.lang3.NumberUtils to org.apache.commons.lang3.math.NumberUtils
  12. Change type org.apache.commons.lang3.math.RandomUtils to org.apache.commons.lang3.RandomUtils
  13. Change method name org.apache.commons.lang3.math.NumberUtils stringToInt(..) to toInt
  14. Change method target to static
  15. Change method name java.lang.Boolean toBooleanObject(boolean) to valueOf
  16. Change method target to static
  17. Change method name org.apache.commons.lang3.StringEscapeUtils escapeHtml(String) to escapeHtml4
  18. Change method name org.apache.commons.lang3.StringEscapeUtils unescapeHtml(String) to unescapeHtml4
  19. Change method name org.apache.commons.lang3.StringEscapeUtils escapeJavaScript(String) to escapeEcmaScript
  20. Change method name org.apache.commons.lang3.StringEscapeUtils unescapeJavaScript(String) to unescapeEcmaScript
  21. Replace SystemUtils#isJavaVersionAtLeast(float) and (int) with the JavaVersion overload
  22. Migrate deprecated SystemUtils constants
  23. Prefer java.nio.charset.StandardCharsets