Author: bayard
Date: Tue Mar 25 00:37:12 2008
New Revision: 640727

URL: http://svn.apache.org/viewvc?rev=640727&view=rev
Log:
Fixing the javadoc for endsWithIgnoreCase as per LANG-418, and adding some 
javadoc to test the novel javadoc examples

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java
    
commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsStartsEndsWithTest.java

Modified: 
commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java
URL: 
http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java?rev=640727&r1=640726&r2=640727&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java 
(original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java 
Tue Mar 25 00:37:12 2008
@@ -5922,10 +5922,11 @@
      *
      * <pre>
      * 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
      * </pre>
      *
      * @see java.lang.String#endsWith(String)

Modified: 
commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsStartsEndsWithTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsStartsEndsWithTest.java?rev=640727&r1=640726&r2=640727&view=diff
==============================================================================
--- 
commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsStartsEndsWithTest.java
 (original)
+++ 
commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsStartsEndsWithTest.java
 Tue Mar 25 00:37:12 2008
@@ -149,6 +149,11 @@
         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"));
     }
 
 }


Reply via email to