You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by re...@apache.org on 2009/06/18 10:38:59 UTC
svn commit: r785956 - in
/harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text:
AttributedString.java ChoiceFormat.java MessageFormat.java
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;