You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "timtebeek (via GitHub)" <gi...@apache.org> on 2023/05/31 14:52:10 UTC

[GitHub] [maven-release] timtebeek commented on pull request #193: prefer JDK String replace methods to Plexus ones

timtebeek commented on PR #193:
URL: https://github.com/apache/maven-release/pull/193#issuecomment-1570389294

   > @timtebeek
   
   Appreciate the update @elharo ; do I understand that this is one you'd like to tackle next?
   I had a quick look; there's some 190 occurrences of `StringUtils.replace(..)` left in Apache Maven;
   45 of those are in src/test; most involve replacing some variant of slashes:
   https://public.moderne.io/results/kTDTf/data-tables (temporary link) / [Google Sheets](https://docs.google.com/spreadsheets/d/1pCFfk22bVXVEux131ZpZ6Stx0kG2ViDY/edit?usp=sharing&ouid=106044755069459698038&rtpof=true&sd=true) (less temporary)
   
   Since we can't yet detect nullability, we'd likely have to insert a null check and fallback, which might look slightly awkward in some. Potentially we'd be able to clean that up in the future, but that would be [some time away](https://github.com/openrewrite/rewrite/issues/3221). Let me know if this is something you'd want to proceed with.
   
   Alternatively there's another few common methods that can be found through:
   https://public.moderne.io/recipes/org.openrewrite.java.search.FindMethods
   With method pattern `*..StringUtils *(..)` run against the Apache Maven organization (top right dropdown).
   Or we can have a look at some of the FileUtils/IOUtils, although I suspect those would require Java 11+ for JDK replacements. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org