diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java index d7999e7f9..bb8136555 100644 --- a/src/main/java/org/apache/commons/lang3/StringUtils.java +++ b/src/main/java/org/apache/commons/lang3/StringUtils.java @@ -6151,7 +6151,10 @@ public class StringUtils { * StringUtils.isAllLowerCase("") = false * StringUtils.isAllLowerCase(" ") = false * StringUtils.isAllLowerCase("abc") = true - * StringUtils.isAllLowerCase("abC") = false + * StringUtils.isAllLowerCase("abC") = false + * StringUtils.isAllLowerCase("ab c") = false + * StringUtils.isAllLowerCase("ab1c") = false + * StringUtils.isAllLowerCase("ab/c") = false * * * @param cs the CharSequence to check, may be null @@ -6183,7 +6186,10 @@ public class StringUtils { * StringUtils.isAllUpperCase("") = false * StringUtils.isAllUpperCase(" ") = false * StringUtils.isAllUpperCase("ABC") = true - * StringUtils.isAllUpperCase("aBC") = false + * StringUtils.isAllUpperCase("aBC") = false + * StringUtils.isAllUpperCase("A C") = false + * StringUtils.isAllUpperCase("A1C") = false + * StringUtils.isAllUpperCase("A/C") = false * * * @param cs the CharSequence to check, may be null diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java index e9931ffc4..5654589de 100644 --- a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java @@ -2066,9 +2066,14 @@ public class StringUtilsTest { public void testIsAllLowerCase() { assertFalse(StringUtils.isAllLowerCase(null)); assertFalse(StringUtils.isAllLowerCase(StringUtils.EMPTY)); + assertFalse(StringUtils.isAllLowerCase(" ")); assertTrue(StringUtils.isAllLowerCase("abc")); assertFalse(StringUtils.isAllLowerCase("abc ")); + assertFalse(StringUtils.isAllLowerCase("abc\n")); assertFalse(StringUtils.isAllLowerCase("abC")); + assertFalse(StringUtils.isAllLowerCase("ab c")); + assertFalse(StringUtils.isAllLowerCase("ab1c")); + assertFalse(StringUtils.isAllLowerCase("ab/c")); } /** @@ -2078,9 +2083,14 @@ public class StringUtilsTest { public void testIsAllUpperCase() { assertFalse(StringUtils.isAllUpperCase(null)); assertFalse(StringUtils.isAllUpperCase(StringUtils.EMPTY)); + assertFalse(StringUtils.isAllUpperCase(" ")); assertTrue(StringUtils.isAllUpperCase("ABC")); assertFalse(StringUtils.isAllUpperCase("ABC ")); + assertFalse(StringUtils.isAllUpperCase("ABC\n")); assertFalse(StringUtils.isAllUpperCase("aBC")); + assertFalse(StringUtils.isAllUpperCase("A C")); + assertFalse(StringUtils.isAllUpperCase("A1C")); + assertFalse(StringUtils.isAllUpperCase("A/C")); } @Test