You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/11/25 12:30:46 UTC

[GitHub] [maven-shared-utils] elharo opened a new pull request, #123: Update Xpp3DomUtils.java

elharo opened a new pull request, #123:
URL: https://github.com/apache/maven-shared-utils/pull/123

   deprecate a string utility method that doesn't belong in this package, wasn't correctly documented, isn't tested, and is duplicated in 72 other places
   
   @slawekjaranowski


-- 
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-shared-utils] kwin commented on a diff in pull request #123: [MSHARED-1172] Deprecate redundant isEmptyString method

Posted by GitBox <gi...@apache.org>.
kwin commented on code in PR #123:
URL: https://github.com/apache/maven-shared-utils/pull/123#discussion_r1059789127


##########
src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java:
##########
@@ -148,15 +148,15 @@ private static boolean isMergeChildren( Xpp3Dom dominant )
     }
 
     /**
-     * @param str The string to be checked.
-     * @return <code>true</code> in case string is empty <code>false</code> otherwise.
+     * @deprecated use <code>str == null || String.isBlank(str)</code> (Java 11+) 

Review Comment:
   Why not recommending `https://github.com/apache/maven-shared-utils/blob/f4383c55f77ad4480f146481bf3192bc52c3af30/src/main/java/org/apache/maven/shared/utils/StringUtils.java#L145` as replacement? Or should we rather deprecate that method as well?



-- 
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-shared-utils] elharo commented on a diff in pull request #123: [MSHARED-1172] Deprecate redundant isEmptyString method

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #123:
URL: https://github.com/apache/maven-shared-utils/pull/123#discussion_r1059790076


##########
src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java:
##########
@@ -148,15 +148,15 @@ private static boolean isMergeChildren( Xpp3Dom dominant )
     }
 
     /**
-     * @param str The string to be checked.
-     * @return <code>true</code> in case string is empty <code>false</code> otherwise.
+     * @deprecated use <code>str == null || String.isBlank(str)</code> (Java 11+) 

Review Comment:
   IMHO
   
   JDK > org,apache.commons > Guava > maven-shared-utils > plexus-utils > random classes  where it doesn't belong
   
   Realistically, this method is reinvented so often and so frequently, we'll never get down to a single version. However this case is particularly egregious. 



-- 
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-shared-utils] elharo commented on pull request #123: [MSHARED-1172] Deprecate redundant isEmptyString method

Posted by GitBox <gi...@apache.org>.
elharo commented on PR #123:
URL: https://github.com/apache/maven-shared-utils/pull/123#issuecomment-1342759869

   PTAl @michael-o 


-- 
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-shared-utils] michael-o commented on a diff in pull request #123: [MSHARED-1172] Deprecate redundant isEmptyString method

Posted by GitBox <gi...@apache.org>.
michael-o commented on code in PR #123:
URL: https://github.com/apache/maven-shared-utils/pull/123#discussion_r1059789284


##########
src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java:
##########
@@ -148,15 +148,15 @@ private static boolean isMergeChildren( Xpp3Dom dominant )
     }
 
     /**
-     * @param str The string to be checked.
-     * @return <code>true</code> in case string is empty <code>false</code> otherwise.
+     * @deprecated use <code>str == null || String.isBlank(str)</code> (Java 11+) 

Review Comment:
   This is fine as well



-- 
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-shared-utils] michael-o commented on a diff in pull request #123: [MSHARED-1172] Deprecate redundant isEmptyString method

Posted by GitBox <gi...@apache.org>.
michael-o commented on code in PR #123:
URL: https://github.com/apache/maven-shared-utils/pull/123#discussion_r1038865260


##########
src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java:
##########
@@ -148,15 +148,15 @@ private static boolean isMergeChildren( Xpp3Dom dominant )
     }
 
     /**
-     * @param str The string to be checked.
-     * @return <code>true</code> in case string is empty <code>false</code> otherwise.
+     * @deprecated use <code>String.isBlank()</code> (Java 11+) 

Review Comment:
   `String#isBlank()` is *not* a replacement because it will cause a NPE if null.



-- 
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-shared-utils] elharo commented on a diff in pull request #123: [MSHARED-1172] Deprecate redundant isEmptyString method

Posted by GitBox <gi...@apache.org>.
elharo commented on code in PR #123:
URL: https://github.com/apache/maven-shared-utils/pull/123#discussion_r1039017348


##########
src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java:
##########
@@ -148,15 +148,15 @@ private static boolean isMergeChildren( Xpp3Dom dominant )
     }
 
     /**
-     * @param str The string to be checked.
-     * @return <code>true</code> in case string is empty <code>false</code> otherwise.
+     * @deprecated use <code>String.isBlank()</code> (Java 11+) 

Review Comment:
   fixed



-- 
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-shared-utils] elharo commented on a diff in pull request #123: [MSHARED-1172] Deprecate redundant isEmptyString method

Posted by GitBox <gi...@apache.org>.
elharo commented on code in PR #123:
URL: https://github.com/apache/maven-shared-utils/pull/123#discussion_r1059790076


##########
src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java:
##########
@@ -148,15 +148,15 @@ private static boolean isMergeChildren( Xpp3Dom dominant )
     }
 
     /**
-     * @param str The string to be checked.
-     * @return <code>true</code> in case string is empty <code>false</code> otherwise.
+     * @deprecated use <code>str == null || String.isBlank(str)</code> (Java 11+) 

Review Comment:
   IMHO
   
   JDK > org,apache.commons > Guava > maven-shared-utils > plexus-utils > random classes  where it doesn't belong
   
   Realistically, this functionality is reinvented so often and so frequently, we'll never get down to a single version. However this case is particularly egregious. 



-- 
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-shared-utils] elharo merged pull request #123: [MSHARED-1172] Deprecate redundant isEmptyString method

Posted by GitBox <gi...@apache.org>.
elharo merged PR #123:
URL: https://github.com/apache/maven-shared-utils/pull/123


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