commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r922911 - in /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3: CharSequenceUtils.java StringUtils.java
Date Sun, 14 Mar 2010 17:44:24 GMT
Author: ggregory
Date: Sun Mar 14 17:44:23 2010
New Revision: 922911

URL: http://svn.apache.org/viewvc?rev=922911&view=rev
Log:
Back out a CSU experiment.

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharSequenceUtils.java?rev=922911&r1=922910&r2=922911&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
Sun Mar 14 17:44:23 2010
@@ -38,32 +38,6 @@ public class CharSequenceUtils {
 	}
 
 	/**
-	 * <p>
-	 * Reverses a CharSequence as per {@link StringBuilder#reverse()}.
-	 * </p>
-	 * 
-	 * <p>
-	 * A <code>null</code> CharSequence returns <code>null</code>.
-	 * </p>
-	 * 
-	 * <pre>
-	 * CharSequenceUtils.reverse(null) = null
-	 * CharSequenceUtils.reverse("").toString() = ""
-	 * CharSequenceUtils.reverse("bat").toString() = "tab"
-	 * </pre>
-	 * 
-	 * @param str
-	 *            the String to reverse, may be null
-	 * @return the reversed String, <code>null</code> if null String input
-	 */
-	public static CharSequence reverse(CharSequence str) {
-		if (str == null) {
-			return null;
-		}
-		return new StringBuilder(str).reverse();
-	}
-
-	/**
 	 * Returns a new <code>CharSequence</code> that is a subsequence of this
 	 * sequence starting with the <code>char</code> value at the specified
 	 * index. The length (in <code>char</code>s) of the returned sequence is

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java?rev=922911&r1=922910&r2=922911&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java Sun
Mar 14 17:44:23 2010
@@ -5414,7 +5414,7 @@ public class StringUtils {
         if (str == null) {
             return null;
         }
-        return CharSequenceUtils.reverse(str).toString();
+		return new StringBuilder(str).reverse().toString();
     }
 
     /**



Mime
View raw message