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/15 11:24:54 UTC

[GitHub] [maven-remote-resources-plugin] timtebeek opened a new pull request, #38: [MNG-6829] Replace any StringUtils#isEmpty(String) and #isNotEmpty(String)

timtebeek opened a new pull request, #38:
URL: https://github.com/apache/maven-remote-resources-plugin/pull/38

   Continuation of https://issues.apache.org/jira/browse/MNG-6829
   
   Review requested of @elharo
   
   Use this link to re-run the recipe: https://public.moderne.io/recipes/org.openrewrite.java.migrate.apache.commons.lang.IsNotEmptyToJdk?organizationId=QXBhY2hlIE1hdmVu


-- 
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-remote-resources-plugin] timtebeek commented on a diff in pull request #38: [MNG-6829] Replace any StringUtils#isEmpty(String) and #isNotEmpty(String)

Posted by "timtebeek (via GitHub)" <gi...@apache.org>.
timtebeek commented on code in PR #38:
URL: https://github.com/apache/maven-remote-resources-plugin/pull/38#discussion_r1193707642


##########
src/main/java/org/apache/maven/plugin/resources/remote/AbstractProcessRemoteResourcesMojo.java:
##########
@@ -384,13 +384,13 @@ public void execute() throws MojoExecutionException {
             return;
         }
 
-        if (StringUtils.isEmpty(encoding)) {
+        if (encoding == null || encoding.isEmpty()) {
             getLog().warn("File encoding has not been set, using platform encoding " + ReaderFactory.FILE_ENCODING
                     + ", i.e. build is platform dependent!");
         }
 
         if (resolveScopes == null) {
-            resolveScopes = new String[] {StringUtils.isEmpty(this.includeScope) ? JavaScopes.TEST : this.includeScope};
+            resolveScopes = new String[] {(this.includeScope == null || this.includeScope.isEmpty()) ? JavaScopes.TEST : this.includeScope};

Review Comment:
   ```suggestion
               resolveScopes = new String[] {
                   (this.includeScope == null || this.includeScope.isEmpty()) ? JavaScopes.TEST : this.includeScope};
   ```



-- 
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-remote-resources-plugin] timtebeek commented on pull request #38: [MNG-6829] Replace any StringUtils#isEmpty(String) and #isNotEmpty(String)

Posted by "timtebeek (via GitHub)" <gi...@apache.org>.
timtebeek commented on PR #38:
URL: https://github.com/apache/maven-remote-resources-plugin/pull/38#issuecomment-1547707077

   FYI: I've proposed https://github.com/diffplug/spotless/discussions/1700 to hopefully make it easier to handle proposed formatting changes through Spotless, as these automated changes often lack a local copy.


-- 
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-remote-resources-plugin] elharo merged pull request #38: [MNG-6829] Replace any StringUtils#isEmpty(String) and #isNotEmpty(String)

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


-- 
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-remote-resources-plugin] timtebeek commented on a diff in pull request #38: [MNG-6829] Replace any StringUtils#isEmpty(String) and #isNotEmpty(String)

Posted by "timtebeek (via GitHub)" <gi...@apache.org>.
timtebeek commented on code in PR #38:
URL: https://github.com/apache/maven-remote-resources-plugin/pull/38#discussion_r1193723360


##########
src/main/java/org/apache/maven/plugin/resources/remote/AbstractProcessRemoteResourcesMojo.java:
##########
@@ -384,13 +384,14 @@ public void execute() throws MojoExecutionException {
             return;
         }
 
-        if (StringUtils.isEmpty(encoding)) {
+        if (encoding == null || encoding.isEmpty()) {
             getLog().warn("File encoding has not been set, using platform encoding " + ReaderFactory.FILE_ENCODING
                     + ", i.e. build is platform dependent!");
         }
 
         if (resolveScopes == null) {
-            resolveScopes = new String[] {StringUtils.isEmpty(this.includeScope) ? JavaScopes.TEST : this.includeScope};
+            resolveScopes = new String[] {
+                (this.includeScope == null || this.includeScope.isEmpty()) ? JavaScopes.TEST : this.includeScope};

Review Comment:
   ```suggestion
                   (this.includeScope == null || this.includeScope.isEmpty()) ? JavaScopes.TEST : this.includeScope
               };
   ```



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