[ 
https://issues.apache.org/jira/browse/MNG-6829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17712762#comment-17712762
 ] 

Tim te Beek commented on MNG-6829:
----------------------------------

I'm working on a replacement recipe for StringUtils.isEmpty / isNotEmpty:
[https://github.com/openrewrite/rewrite-migrate-java/pull/209]
We look to have 1122 such method calls in Apache Maven repositories.
My recipe won't yet replace all of them, but a good portion can be simplified.

Also see the excel file added to this issue: [^dtPKn.xlsx]
That's created through running the following on Apache Maven repositories 
through: https://public.moderne.io/recipes/builder
```
type: specs.openrewrite.org/v1beta/recipe
name: com.github.timtebeek.maven.rewrite.Find
displayName: Find
description: Find
recipeList:
  - org.openrewrite.java.search.FindMethods:
      methodPattern: "*..StringUtils isEmpty(..)"
  - org.openrewrite.java.search.FindMethods:
      methodPattern: "*..StringUtils isNotEmpty(..)"
```

Seeing how https://issues.apache.org/jira/browse/MNG-6825 is already closed,
I could use this issue code for those replacements if we keep it open just a 
bit longer.

> Remove commons-lang3 dependency
> -------------------------------
>
>                 Key: MNG-6829
>                 URL: https://issues.apache.org/jira/browse/MNG-6829
>             Project: Maven
>          Issue Type: Sub-task
>          Components: Bootstrap & Build
>    Affects Versions: 3.6.3
>            Reporter: Karl Heinz Marbaise
>            Assignee: Karl Heinz Marbaise
>            Priority: Minor
>              Labels: close-pending
>             Fix For: 4.0.x-candidate
>
>         Attachments: dtPKn.xlsx
>
>
> Currently we use {{commons-lang3}} for the following classes
> * {{StringUtils}} can be replaced by usage of either {{plexus-utils}} or 
> {{maven-shared-utils}} or as I tested with self implementation
> * {{SystemUtils}} is only used in some tests which can simply replaced by 
> using JUnit Jupiter with all the support it has.
> * {{Validate}} is a precondition class which checks for parameters etc. can 
> be implemented very easily (done already to see how it works). Later this 
> could be made part of {{maven-shared-utils}}.
> * Currently the {{StringUtils.substringAfterLast( resourceName,  "/" )}} is 
> used in {{ConsoleMavenTransferListener}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to