[MNG-6829] Replace StringUtils#isEmpty(String) & #isNotEmpty(String)#58
Conversation
Last batch of is(Not)Empty for https://issues.apache.org/jira/browse/MNG-6829 These are the smallest change sets, hence why I opened more at the same time. After this we can target the next most often used method from the StringUtils classes. Use this link to re-run the recipe: https://public.moderne.io/recipes/org.openrewrite.java.migrate.apache.commons.lang.IsNotEmptyToJdk?organizationId=QXBhY2hlIE1hdmVu Co-authored-by: Moderne <[email protected]>
|
@elharo I notice that my commit message didn't make it into the created pull request message, so you might not be aware of some of these last open pull requests. Would you mind going through this last batch?
|
| if (artifactType != null | ||
| && StringUtils.isEmpty(classifier) | ||
| && (classifier == null || classifier.isEmpty()) | ||
| && !StringUtils.isEmpty(artifactType.getClassifier())) { |
There was a problem hiding this comment.
Noticed it missed one in line 222
There was a problem hiding this comment.
That's surprising! Usually when that happens there's some missing type attribution; I'll do a final sweep to see if it pops up again.
There was a problem hiding this comment.
Looking at this again: the line was not missed, but intentionally left out in the recipe, as we can't be certain that the argument method invocation is safe to call twice; once for the null check, and again for the isEmpty call. Hence why I don't convert those automatically yet, even though in this case it's probably safe to do.
Use this link to re-run the recipe: https://public.moderne.io/recipes/org.openrewrite.java.migrate.apache.commons.lang.IsNotEmptyToJdk?organizationId=QXBhY2hlIE1hdmVu