commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r1082817 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
Date Fri, 18 Mar 2011 03:42:18 GMT
Author: bayard
Date: Fri Mar 18 03:42:17 2011
New Revision: 1082817

URL: http://svn.apache.org/viewvc?rev=1082817&view=rev
Log:
Removing the unnecessary sequenceToString method

Modified:
    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/StringUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java?rev=1082817&r1=1082816&r2=1082817&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 Fri
Mar 18 03:42:17 2011
@@ -2002,7 +2002,7 @@ public class StringUtils {
             return EMPTY;
         }
 
-        return sequenceToString(str.subSequence(start, str.length()));
+        return str.subSequence(start, str.length()).toString();
     }
 
     /**
@@ -2070,7 +2070,7 @@ public class StringUtils {
             end = 0;
         }
 
-        return sequenceToString(str.subSequence(start, end));
+        return str.subSequence(start, end).toString();
     }
 
     // Left/Right/Mid
@@ -6495,13 +6495,4 @@ public class StringUtils {
         }
     }
 
-    // Convert a CharSequence to a String
-    static String sequenceToString(CharSequence cs) {
-        if (cs instanceof String) {
-            return ((String) cs);
-        } else {
-            return cs.toString();
-        }
-    }
-
 }



Mime
View raw message