harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From regi...@apache.org
Subject svn commit: r785956 - in /harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text: AttributedString.java ChoiceFormat.java MessageFormat.java
Date Thu, 18 Jun 2009 08:38:59 GMT
Author: regisxu
Date: Thu Jun 18 08:38:58 2009
New Revision: 785956

URL: http://svn.apache.org/viewvc?rev=785956&view=rev
Log:
replace loacl StringBuffer variables with StringBuilder in text module

Modified:
    harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/AttributedString.java
    harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/ChoiceFormat.java
    harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/MessageFormat.java

Modified: harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/AttributedString.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/AttributedString.java?rev=785956&r1=785955&r2=785956&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/AttributedString.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/AttributedString.java
Thu Jun 18 08:38:58 2009
@@ -392,7 +392,7 @@
             // text.0A=Invalid substring range
             throw new IllegalArgumentException(Messages.getString("text.0A")); //$NON-NLS-1$
         }
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         for (int i = iterator.getBeginIndex(); i < iterator.getEndIndex(); i++) {
             buffer.append(iterator.current());
             iterator.next();
@@ -433,7 +433,7 @@
             return;
         }
 
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         iterator.setIndex(start);
         while (iterator.getIndex() < end) {
             buffer.append(iterator.current());

Modified: harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/ChoiceFormat.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/ChoiceFormat.java?rev=785956&r1=785955&r2=785956&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/ChoiceFormat.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/ChoiceFormat.java
Thu Jun 18 08:38:58 2009
@@ -446,7 +446,7 @@
      * @return the pattern.
      */
     public String toPattern() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         for (int i = 0; i < choiceLimits.length; i++) {
             if (i != 0) {
                 buffer.append('|');

Modified: harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/MessageFormat.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/MessageFormat.java?rev=785956&r1=785955&r2=785956&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/MessageFormat.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/MessageFormat.java
Thu Jun 18 08:38:58 2009
@@ -1255,7 +1255,7 @@
         int offset = 0;
         int offsetsLength = maxOffset + 1;
         int[] offsets = new int[offsetsLength];
-        StringBuffer pattern = new StringBuffer();
+        StringBuilder pattern = new StringBuilder();
         for (int i = 0; i <= maxOffset; i++) {
             offset += strings[i].length();
             offsets[i] = offset;



Mime
View raw message