garydgregory commented on code in PR #1308:
URL: https://github.com/apache/commons-lang/pull/1308#discussion_r1824971350


##########
src/main/java/org/apache/commons/lang3/StringUtils.java:
##########
@@ -1191,13 +1191,13 @@ public static boolean containsIgnoreCase(final 
CharSequence str, final CharSeque
      * An empty CharSequence (length()=0) always returns true.</p>
      *
      * <pre>
-     * StringUtils.containsNone(null, *)       = true
-     * StringUtils.containsNone(*, null)       = true
-     * StringUtils.containsNone("", *)         = true
-     * StringUtils.containsNone("ab", '')      = true
-     * StringUtils.containsNone("abab", 'xyz') = true
-     * StringUtils.containsNone("ab1", 'xyz')  = true
-     * StringUtils.containsNone("abz", 'xyz')  = false
+     * StringUtils.containsNone(null, *)            = true
+     * StringUtils.containsNone("", *)              = true
+     * StringUtils.containsNone(*, null)            = true
+     * StringUtils.containsNone(*, [])              = true
+     * StringUtils.containsNone("abc", ['x', 'y'])  = true
+     * StringUtils.containsNone("abc", ['1', '.'])  = true

Review Comment:
   Hi @ParanoidUser 
   
   Using `['1', '.']` is _more_ confusing IMO instead of 'x', 'y', 'z'. You use 
* and `[text]` which won't compile either, which ironically, is what the PR's 
description complains about!
   
   Are we to assume that '.' is a regular expression or a the actual character 
dot in `['1', '.']` since it's in between y and z examples?
   
   The _reason_ there are many examples in Javadoc is to _avoid_ using BNF or 
RegEx. I can see an exception for using `*` but anything more clever than that 
is going to be counter productive IMO. 
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to