You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/04/14 02:19:52 UTC

[GitHub] [commons-lang] xuxiao415 opened a new pull request #743: Lang 1656: first non blank returned

xuxiao415 opened a new pull request #743:
URL: https://github.com/apache/commons-lang/pull/743


   add new feature for first non blank returned by supplier array


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

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



[GitHub] [commons-lang] coveralls commented on pull request #743: Lang 1656: first non blank returned

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #743:
URL: https://github.com/apache/commons-lang/pull/743#issuecomment-819175374


   
   [![Coverage Status](https://coveralls.io/builds/38790508/badge)](https://coveralls.io/builds/38790508)
   
   Coverage increased (+0.004%) to 94.943% when pulling **dde2043ca5db9a77b3fbe008e0ed3bc1bd65fc2d on xuxiao415:LANG-1656-firstNonBlankReturned** into **d1e9e598c9bcbf91afa174fa9b6c2ef30bbc8157 on apache:master**.
   


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

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



[GitHub] [commons-lang] xuxiao415 closed pull request #743: Lang 1656: first non blank returned

Posted by GitBox <gi...@apache.org>.
xuxiao415 closed pull request #743:
URL: https://github.com/apache/commons-lang/pull/743


   


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

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



[GitHub] [commons-lang] arturobernalg commented on pull request #743: Lang 1656: first non blank returned

Posted by GitBox <gi...@apache.org>.
arturobernalg commented on pull request #743:
URL: https://github.com/apache/commons-lang/pull/743#issuecomment-819727819


   > > Shouldn't these functions be in the `ObjectUtils` class?
   > 
   > because the type of value returned by function is subclass of `CharSequence`
   
   Sounds fair.


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

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



[GitHub] [commons-lang] xuxiao415 commented on pull request #743: Lang 1656: first non blank returned

Posted by GitBox <gi...@apache.org>.
xuxiao415 commented on pull request #743:
URL: https://github.com/apache/commons-lang/pull/743#issuecomment-819259496


   > Shouldn't these functions be in the `ObjectUtils` class?
   
   because the type of value returned by function is subclass of `CharSequence`


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

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



[GitHub] [commons-lang] arturobernalg commented on a change in pull request #743: Lang 1656: first non blank returned

Posted by GitBox <gi...@apache.org>.
arturobernalg commented on a change in pull request #743:
URL: https://github.com/apache/commons-lang/pull/743#discussion_r612933717



##########
File path: src/main/java/org/apache/commons/lang3/StringUtils.java
##########
@@ -1983,6 +2024,44 @@ public static boolean equalsIgnoreCase(final CharSequence cs1, final CharSequenc
         return null;
     }
 
+    /**
+     * <p>Returns the first value returned in the supplier array which is not empty.</p>
+     *
+     * <p>If all values are null or all values returned are empty or the array is {@code null}
+     * or empty then {@code null} is returned.</p>
+     *
+     * <pre>
+     * StringUtils.firstNonEmptyReturned(() -> null, () -> null, () -> null)    = null

Review comment:
       I think you should escape the "`->`" using `-&gt`

##########
File path: src/main/java/org/apache/commons/lang3/StringUtils.java
##########
@@ -1948,6 +1948,47 @@ public static boolean equalsIgnoreCase(final CharSequence cs1, final CharSequenc
         return null;
     }
 
+    /**
+     * <p>Returns the first value returned in the supplier array which is not empty (""),
+     * {@code null} or whitespace only.</p>
+     *
+     * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
+     *
+     * <p>If all values are null or all values returned are blank or the array is {@code null}
+     * or empty then {@code null} is returned.</p>
+     *
+     * <pre>
+     * StringUtils.firstNonBlankReturned(() -> null, () -> null, () -> null)            = null

Review comment:
       I think you should escape the "`->`" using `-&gt`




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

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



[GitHub] [commons-lang] arturobernalg commented on pull request #743: Lang 1656: first non blank returned

Posted by GitBox <gi...@apache.org>.
arturobernalg commented on pull request #743:
URL: https://github.com/apache/commons-lang/pull/743#issuecomment-819224393


   Shouldn't these functions be in the `ObjectUtils` class?


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

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