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 13:54:43 UTC
[GitHub] [commons-lang] arturobernalg commented on a change in pull request #743: Lang 1656: first non blank returned
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 `->`
##########
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 `->`
--
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