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

[GitHub] [maven-release] elharo opened a new pull request, #193: prefer JDK methods to Plexus ones

elharo opened a new pull request, #193:
URL: https://github.com/apache/maven-release/pull/193

   @timtebeek 


-- 
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


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

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on PR #193:
URL: https://github.com/apache/maven-release/pull/193#issuecomment-1570090255

   Yes. None of the strings involved can be null here. They're either literals or null-checked earlier in the method.


-- 
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


[GitHub] [maven-release] elharo merged pull request #193: prefer JDK String replace methods to Plexus ones

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo merged PR #193:
URL: https://github.com/apache/maven-release/pull/193


-- 
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


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

Posted by "timtebeek (via GitHub)" <gi...@apache.org>.
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


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

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on PR #193:
URL: https://github.com/apache/maven-release/pull/193#issuecomment-1570490427

   A lot of FileUtils and IOUtils can be fixed in Java 8. I'm not sure it's a simple search and replace though. For instance, I've removed a lot of IOUtils.close() methods by using try with resources. 


-- 
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


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

Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz commented on PR #193:
URL: https://github.com/apache/maven-release/pull/193#issuecomment-1570004618

   Is this null safe?


-- 
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


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

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on PR #193:
URL: https://github.com/apache/maven-release/pull/193#issuecomment-1570487178

   Not necessarily next. Just thought I'd call your attention to some methods that are really, really out of date


-- 
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