diff --git a/src/java/org/apache/commons/lang/StringUtils.java b/src/java/org/apache/commons/lang/StringUtils.java index 89d0a0962..0a806acf1 100644 --- a/src/java/org/apache/commons/lang/StringUtils.java +++ b/src/java/org/apache/commons/lang/StringUtils.java @@ -2795,7 +2795,7 @@ public class StringUtils { * StringUtils.removeEnd(null, *) = null * StringUtils.removeEnd("", *) = "" * StringUtils.removeEnd(*, null) = * - * StringUtils.removeEnd("www.domain.com", ".com.") = "www,domain" + * StringUtils.removeEnd("www.domain.com", ".com.") = "www.domain.com." * StringUtils.removeEnd("www.domain.com", ".com") = "www.domain" * StringUtils.removeEnd("www.domain.com", "domain") = "www.domain.com" * StringUtils.removeEnd("abc", "") = "abc" diff --git a/src/test/org/apache/commons/lang/StringUtilsTest.java b/src/test/org/apache/commons/lang/StringUtilsTest.java index dac3843bb..c1595dfd6 100644 --- a/src/test/org/apache/commons/lang/StringUtilsTest.java +++ b/src/test/org/apache/commons/lang/StringUtilsTest.java @@ -1482,6 +1482,7 @@ public class StringUtilsTest extends TestCase { assertEquals(StringUtils.removeEnd("", "a"), ""); // All others: + assertEquals(StringUtils.removeEnd("www.domain.com.", ".com"), "www.domain.com."); assertEquals(StringUtils.removeEnd("www.domain.com", ".com"), "www.domain"); assertEquals(StringUtils.removeEnd("www.domain", ".com"), "www.domain"); assertEquals(StringUtils.removeEnd("domain.com", ""), "domain.com");