diff --git a/src/java/org/apache/commons/lang/StringUtils.java b/src/java/org/apache/commons/lang/StringUtils.java index 91aa135f6..c6ab922d1 100644 --- a/src/java/org/apache/commons/lang/StringUtils.java +++ b/src/java/org/apache/commons/lang/StringUtils.java @@ -5922,10 +5922,11 @@ public class StringUtils { * *
      * StringUtils.endsWithIgnoreCase(null, null)      = true
-     * StringUtils.endsWithIgnoreCase(null, "abcdef")  = false
-     * StringUtils.endsWithIgnoreCase("def", null)     = false
-     * StringUtils.endsWithIgnoreCase("def", "abcdef") = true
-     * StringUtils.endsWithIgnoreCase("def", "ABCDEF") = false
+     * StringUtils.endsWithIgnoreCase("abcdef", null)  = false
+     * StringUtils.endsWithIgnoreCase(null, "def")     = false
+     * StringUtils.endsWithIgnoreCase("abcdef", "def") = true
+     * StringUtils.endsWithIgnoreCase("ABCDEF", "def") = true
+     * StringUtils.endsWithIgnoreCase("ABCDEF", "cde") = false
      * 
* * @see java.lang.String#endsWith(String) diff --git a/src/test/org/apache/commons/lang/StringUtilsStartsEndsWithTest.java b/src/test/org/apache/commons/lang/StringUtilsStartsEndsWithTest.java index 1c7fdeef5..6d1e48f4d 100644 --- a/src/test/org/apache/commons/lang/StringUtilsStartsEndsWithTest.java +++ b/src/test/org/apache/commons/lang/StringUtilsStartsEndsWithTest.java @@ -149,6 +149,11 @@ public class StringUtilsStartsEndsWithTest extends TestCase { assertTrue("endsWithIgnoreCase(FOOBAR, BAR)", StringUtils.endsWithIgnoreCase(FOOBAR, BAR)); assertTrue("endsWithIgnoreCase(foobar, BAR)", StringUtils.endsWithIgnoreCase(foobar, BAR)); assertTrue("endsWithIgnoreCase(FOOBAR, bar)", StringUtils.endsWithIgnoreCase(FOOBAR, bar)); + + // javadoc + assertTrue(StringUtils.endsWithIgnoreCase("abcdef", "def")); + assertTrue(StringUtils.endsWithIgnoreCase("ABCDEF", "def")); + assertFalse(StringUtils.endsWithIgnoreCase("ABCDEF", "cde")); } }