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 class StringUtils {
|
|||
* 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 class StringUtilsEqualsIndexOfTest {
|
|||
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…
Reference in New Issue