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 2019/10/15 12:36:08 UTC

[GitHub] [commons-lang] verhas commented on a change in pull request #416: Add support of lazy default value evaluation for defaulting methods

verhas commented on a change in pull request #416: Add support of lazy default value evaluation for defaulting methods
URL: https://github.com/apache/commons-lang/pull/416#discussion_r334923149
 
 

 ##########
 File path: src/main/java/org/apache/commons/lang3/StringUtils.java
 ##########
 @@ -1491,12 +1491,12 @@ public static int countMatches(final CharSequence str, final CharSequence sub) {
      * <p>Caller responsible for thread-safety and exception handling of default value supplier</p>
      *
      * <pre>
-     * StringUtils.lazyDefaultIfBlank(null, () -&gt; "NULL")   = "NULL"
-     * StringUtils.lazyDefaultIfBlank("", () -&gt; "NULL")     = "NULL"
-     * StringUtils.lazyDefaultIfBlank(" ", () -&gt; "NULL")    = "NULL"
-     * StringUtils.lazyDefaultIfBlank("bat", () -&gt; "NULL")  = "bat"
-     * StringUtils.lazyDefaultIfBlank("", () -&gt; null)       = null
-     * StringUtils.lazyDefaultIfBlank("", null)                = null
+     * StringUtils.defaultIfBlank(null, () -&gt; "NULL")   = "NULL"
 
 Review comment:
   You know that you can combine `<pre>` and `{@code` to avoid using the ugly HTML escape sequences. I learned that from the JDK source.

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


With regards,
Apache Git Services