[MNG-6829] Replace any StringUtils#isEmpty(String) and #isNotEmpty(String)#1104
Conversation
…ring) 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 <team@moderne.io>
elharo
left a comment
There was a problem hiding this comment.
I'm surprised none of these change the imports
|
Some of these remove imports though right? But only when there's no other methods being called. There's quite a few I'd not reconsidered replacing imports yet (going from one string utils implementation to another), as it seemed removing was preferred over replacement. Is that still the case? We can discuss what to tackle next and how to approach things going forward, as there were other concerns as well such as matching up per project Jira issues. Perhaps we can schedule a brief call or chat at a conference to discuss? |
|
I didn't notice any import changes. Maybe I just missed them. I'd expect that in some if not all of these files these would be the only methods used from StringUtils so I expected to see some import removals. |
| import org.apache.maven.project.MavenProject; | ||
| import org.apache.maven.shared.utils.logging.MessageBuilder; | ||
| import org.apache.maven.shared.utils.logging.MessageUtils; | ||
| import org.codehaus.plexus.util.StringUtils; |
There was a problem hiding this comment.
OK, looks like it is sometimes removing an import. That's good.
|
Resolve #8458 |
Part of an ongoing effort to phase out StringUtils.
https://issues.apache.org/jira/browse/MNG-6829
Use this link to re-run the recipe: https://public.moderne.io/recipes/org.openrewrite.java.migrate.apache.commons.lang.IsNotEmptyToJdk?organizationId=QXBhY2hlIE1hdmVu
Review requested of @elharo
Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[MNG-XXX] SUMMARY,where you replace
MNG-XXXandSUMMARYwith the appropriate JIRA issue.[MNG-XXX] SUMMARY.Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
mvn clean verifyto make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.