mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-12 13:05:06 +00:00
Clarify behavior of containsAny for null entries in the supplied CharSequence array
This commit is contained in:
parent
d864bbfb8f
commit
adc6bc4104
@ -1684,6 +1684,7 @@ public static boolean containsAny(final CharSequence cs, final CharSequence sear
|
||||
* StringUtils.containsAny(*, null) = false
|
||||
* StringUtils.containsAny(*, []) = false
|
||||
* StringUtils.containsAny("abcd", "ab", "cd") = false
|
||||
* StringUtils.containsAny("abcd", "ab", null) = false
|
||||
* StringUtils.containsAny("abc", "d", "abc") = true
|
||||
* </pre>
|
||||
*
|
||||
|
@ -226,6 +226,8 @@ public void testContainsAny_StringStringArray() {
|
||||
assertTrue(StringUtils.containsAny("hello, goodbye", new String[] { "hello", "goodbye" }));
|
||||
assertTrue(StringUtils.containsAny("hello, goodbye", new String[] { "hello", "Goodbye" }));
|
||||
assertFalse(StringUtils.containsAny("hello, goodbye", new String[] { "Hello", "Goodbye" }));
|
||||
assertFalse(StringUtils.containsAny("hello, goodbye", new String[] { "Hello", null }));
|
||||
assertFalse(StringUtils.containsAny("hello, null", new String[] { "Hello", null }));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
x
Reference in New Issue
Block a user