commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r828909 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/ExtendedMessageFormat.java
Date Fri, 23 Oct 2009 01:37:07 GMT
Author: sebb
Date: Fri Oct 23 01:37:07 2009
New Revision: 828909

URL: http://svn.apache.org/viewvc?rev=828909&view=rev
Log:
LANG-541 - Switched StringBuffer to StringBuilder when only used internally

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/ExtendedMessageFormat.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/ExtendedMessageFormat.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/ExtendedMessageFormat.java?rev=828909&r1=828908&r2=828909&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/ExtendedMessageFormat.java
(original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/ExtendedMessageFormat.java
Fri Oct 23 01:37:07 2009
@@ -149,7 +149,7 @@
         }
         ArrayList<Format> foundFormats = new ArrayList<Format>();
         ArrayList<String> foundDescriptions = new ArrayList<String>();
-        StringBuffer stripCustom = new StringBuffer(pattern.length());
+        StringBuilder stripCustom = new StringBuilder(pattern.length());
 
         ParsePosition pos = new ParsePosition(0);
         char[] c = pattern.toCharArray();
@@ -184,7 +184,7 @@
                     throw new IllegalArgumentException(
                             "Unreadable format element at position " + start);
                 }
-                // fall through
+                //$FALL-THROUGH$
             default:
                 stripCustom.append(c[pos.getIndex()]);
                 next(pos);
@@ -351,7 +351,7 @@
         if (!containsElements(customPatterns)) {
             return pattern;
         }
-        StringBuffer sb = new StringBuffer(pattern.length() * 2);
+        StringBuilder sb = new StringBuilder(pattern.length() * 2);
         ParsePosition pos = new ParsePosition(0);
         int fe = -1;
         int depth = 0;
@@ -375,7 +375,7 @@
                 break;
             case END_FE:
                 depth--;
-                //fall through:
+                //$FALL-THROUGH$
             default:
                 sb.append(c);
                 next(pos);
@@ -420,8 +420,8 @@
      * @param escapingOn whether to process escaped quotes
      * @return <code>appendTo</code>
      */
-    private StringBuffer appendQuotedString(String pattern, ParsePosition pos,
-            StringBuffer appendTo, boolean escapingOn) {
+    private StringBuilder appendQuotedString(String pattern, ParsePosition pos,
+            StringBuilder appendTo, boolean escapingOn) {
         int start = pos.getIndex();
         char[] c = pattern.toCharArray();
         if (escapingOn && c[start] == QUOTE) {



Mime
View raw message