Open yeikel opened 2 years ago
from openrewrite/rewrite#1909
Teams often are using org.apache.commons.lang.StringUtils instead of org.apache.commons.lang3.StringUtils so I would like a recipe that migrates to commons-lang3.
I see the recipe as:
org.apache.commons.lang -> org.apache.commons.lang3
If commons-lang is present in the pom file, remove it.
If commons-lang3 is NOT present in the pom and/or dependency tree add it.
One note that StringEscapeUtils has been deprecated as of Lang 3.6 see:
And a similar situation with org.apache.commons.lang3.text
Weekend-Tim has been having some fun and progress with migrating other/older StringUtils classes to Commons-Lang3; that work is currently at https://github.com/timtebeek/maven-rewrite/blob/main/src/main/resources/META-INF/rewrite/string-utils.yml Welcome to lift anything that you find valuable over to this project.
See https://commons.apache.org/proper/commons-lang/article3_0.html
I have seen this example in my projects :
import org.apache.commons.lang.StringUtils -> import org.apache.commons.lang3.StringUtils
But I am sure that there are many others