[LANG-1191] Incorrect Javadoc StringUtils.containsAny(CharSequence,
CharSequence...).
This commit is contained in:
parent
04a5d83aec
commit
3af7d0dace
|
@ -75,6 +75,7 @@
|
|||
<action issue="LANG-1162" type="fix" dev="sebb">StringUtils#equals fails with Index OOBE on non-Strings with identical leading prefix</action>
|
||||
<action issue="LANG-1163" type="fix" dev="sebb">There are no tests for CharSequenceUtils.regionMatches</action>
|
||||
<action issue="LANG-1200" type="fix" dev="ggregory" due-to="BarkZhang">[GitHub PR] modify note at line 1230 #120</action>
|
||||
<action issue="LANG-1191" type="fix" dev="ggregory" due-to="qed, Brent Worden, Gary Gregory">Incorrect Javadoc StringUtils.containsAny(CharSequence, CharSequence...)</action>
|
||||
</release>
|
||||
|
||||
<release version="3.4" date="2014-04-06" description="Feature and bugfix release">
|
||||
|
|
|
@ -1935,7 +1935,7 @@ public class StringUtils {
|
|||
* <p>Checks if the CharSequence contains any of the CharSequences in the given array.</p>
|
||||
*
|
||||
* <p>
|
||||
* A {@code null} CharSequence will return {@code false}. A {@code null} or zero
|
||||
* A {@code null} {@code cs} CharSequence will return {@code false}. A {@code null} or zero
|
||||
* length search array will return {@code false}.
|
||||
* </p>
|
||||
*
|
||||
|
@ -1944,14 +1944,15 @@ public class StringUtils {
|
|||
* StringUtils.containsAny("", *) = false
|
||||
* StringUtils.containsAny(*, null) = false
|
||||
* StringUtils.containsAny(*, []) = false
|
||||
* StringUtils.containsAny("abcd", "ab", null) = false
|
||||
* StringUtils.containsAny("abcd", "ab", null) = true
|
||||
* StringUtils.containsAny("abcd", "ab", "cd") = true
|
||||
* StringUtils.containsAny("abc", "d", "abc") = true
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @param cs The CharSequence to check, may be null
|
||||
* @param searchCharSequences The array of CharSequences to search for, may be null
|
||||
* @param searchCharSequences The array of CharSequences to search for, may be null.
|
||||
* Individual CharSequences may be null as well.
|
||||
* @return {@code true} if any of the search CharSequences are found, {@code false} otherwise
|
||||
* @since 3.4
|
||||
*/
|
||||
|
|
|
@ -236,6 +236,10 @@ public class StringUtilsEqualsIndexOfTest {
|
|||
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 }));
|
||||
// Javadoc examples:
|
||||
assertTrue(StringUtils.containsAny("abcd", "ab", null));
|
||||
assertTrue(StringUtils.containsAny("abcd", "ab", "cd"));
|
||||
assertTrue(StringUtils.containsAny("abc", "d", "abc"));
|
||||
}
|
||||
|
||||
@SystemDefaults(locale="de_DE")
|
||||
|
|
Loading…
Reference in New Issue