harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From regi...@apache.org
Subject svn commit: r785971 - in /harmony/enhanced/classlib/trunk/modules: accessibility/src/main/java/javax/accessibility/ auth/src/main/java/common/javax/security/auth/ beans/src/main/java/java/beans/ concurrent/src/main/java/java/util/concurrent/ imageio/sr...
Date Thu, 18 Jun 2009 09:12:41 GMT
Author: regisxu
Date: Thu Jun 18 09:12:39 2009
New Revision: 785971

URL: http://svn.apache.org/viewvc?rev=785971&view=rev
Log:
replace local StringBuffer variables with StringBuilder in reset modules

Modified:
    harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleRelationSet.java
    harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleStateSet.java
    harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/Subject.java
    harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLDecoder.java
    harmony/enhanced/classlib/trunk/modules/concurrent/src/main/java/java/util/concurrent/CopyOnWriteArrayList.java
    harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java
    harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/javax/imageio/stream/ImageInputStreamImpl.java
    harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Throwable.java
    harmony/enhanced/classlib/trunk/modules/math/src/main/java/java/math/BigDecimal.java
    harmony/enhanced/classlib/trunk/modules/math/src/main/java/java/math/Conversion.java
    harmony/enhanced/classlib/trunk/modules/math/src/main/java/java/math/MathContext.java
    harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/AbstractPreferences.java
    harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/RegistryPreferencesImpl.java
    harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/XMLParser.java
    harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/javax/print/attribute/SetOfIntegerSyntax.java
    harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/Graphics2D2PS.java
    harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/MimeType.java
    harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/attributes/MediaMargins.java
    harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/ipp/util/IppMimeType.java
    harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/CharClass.java
    harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/DecomposedCharSet.java
    harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Lexer.java
    harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java
    harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Pattern.java
    harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/UCISequenceSet.java
    harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/EclipseJavaCompiler.java
    harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIUtil.java
    harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/compiler/ClassStub.java
    harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/compiler/Indenter.java
    harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/compiler/RmicUtil.java
    harmony/enhanced/classlib/trunk/modules/sql/src/main/java/javax/sql/rowset/serial/SQLOutputImpl.java

Modified: harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleRelationSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleRelationSet.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleRelationSet.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleRelationSet.java
Thu Jun 18 09:12:39 2009
@@ -117,7 +117,7 @@
         if (relations == null) {
             return ""; //$NON-NLS-1$
         }
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         for (Iterator<AccessibleRelation> it = relations.iterator(); it
                 .hasNext();) {
             result.append(it.next());

Modified: harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleStateSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleStateSet.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleStateSet.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleStateSet.java
Thu Jun 18 09:12:39 2009
@@ -91,7 +91,7 @@
         if (states == null) {
             return null;
         }
-        StringBuffer str = new StringBuffer();
+        StringBuilder str = new StringBuilder();
         for (Iterator<AccessibleState> it = states.iterator(); it.hasNext();) {
             str.append(it.next().toString());
             if (it.hasNext()) {

Modified: harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/Subject.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/Subject.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/Subject.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/Subject.java
Thu Jun 18 09:12:39 2009
@@ -430,7 +430,7 @@
     @Override
     public String toString() {
 
-        StringBuffer buf = new StringBuffer("Subject:\n"); //$NON-NLS-1$
+        StringBuilder buf = new StringBuilder("Subject:\n"); //$NON-NLS-1$
 
         Iterator<?> it = principals.iterator();
         while (it.hasNext()) {

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLDecoder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLDecoder.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLDecoder.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLDecoder.java
Thu Jun 18 09:12:39 2009
@@ -438,7 +438,7 @@
         }
 
         private String capitalize(String str) {
-            StringBuffer buf = new StringBuffer(str);
+            StringBuilder buf = new StringBuilder(str);
             buf.setCharAt(0, Character.toUpperCase(buf.charAt(0)));
             return buf.toString();
         }

Modified: harmony/enhanced/classlib/trunk/modules/concurrent/src/main/java/java/util/concurrent/CopyOnWriteArrayList.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/concurrent/src/main/java/java/util/concurrent/CopyOnWriteArrayList.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/concurrent/src/main/java/java/util/concurrent/CopyOnWriteArrayList.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/concurrent/src/main/java/java/util/concurrent/CopyOnWriteArrayList.java
Thu Jun 18 09:12:39 2009
@@ -437,7 +437,7 @@
 
     @Override
     public String toString() {
-        StringBuffer sb = new StringBuffer("[");
+        StringBuilder sb = new StringBuilder("[");
 
         Iterator it = listIterator();
         while (it.hasNext()) {

Modified: harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java
Thu Jun 18 09:12:39 2009
@@ -146,7 +146,7 @@
 
     @Override
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         sb.append("JPEGHuffmanTable:\nlengths:");
         for (short length : lengths) {

Modified: harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/javax/imageio/stream/ImageInputStreamImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/javax/imageio/stream/ImageInputStreamImpl.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/javax/imageio/stream/ImageInputStreamImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/javax/imageio/stream/ImageInputStreamImpl.java
Thu Jun 18 09:12:39 2009
@@ -163,7 +163,7 @@
 	}
 
 	public String readLine() throws IOException {
-		final StringBuffer line = new StringBuffer(80);
+		final StringBuilder line = new StringBuilder(80);
 		boolean isEmpty = true;
 		int c = -1;
 

Modified: harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Throwable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Throwable.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Throwable.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Throwable.java
Thu Jun 18 09:12:39 2009
@@ -329,7 +329,7 @@
         if (msg == null) {
             return name;
         }
-        return new StringBuffer(name.length() + 2 + msg.length()).append(name).append(":
")
+        return new StringBuilder(name.length() + 2 + msg.length()).append(name).append(":
")
                 .append(msg).toString();
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/math/src/main/java/java/math/BigDecimal.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/math/src/main/java/java/math/BigDecimal.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/math/src/main/java/java/math/BigDecimal.java (original)
+++ harmony/enhanced/classlib/trunk/modules/math/src/main/java/java/math/BigDecimal.java Thu
Jun 18 09:12:39 2009
@@ -2299,7 +2299,7 @@
         int begin = (getUnscaledValue().signum() < 0) ? 2 : 1;
         int end = intString.length();
         long exponent = -(long)scale + end - begin;
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
 
         result.append(intString);
         if ((scale > 0) && (exponent >= -6)) {
@@ -2344,7 +2344,7 @@
         int begin = (getUnscaledValue().signum() < 0) ? 2 : 1;
         int end = intString.length();
         long exponent = -(long)scale + end - begin;
-        StringBuffer result = new StringBuffer(intString);
+        StringBuilder result = new StringBuilder(intString);
 
         if ((scale > 0) && (exponent >= -6)) {
             if (exponent >= 0) {
@@ -2413,7 +2413,7 @@
         int begin = (signum() < 0) ? 1 : 0;
         int delta = scale;
         // We take space for all digits, plus a possible decimal point, plus 'scale'
-        StringBuffer result = new StringBuffer(intStr.length() + 1 + Math.abs(scale));
+        StringBuilder result = new StringBuilder(intStr.length() + 1 + Math.abs(scale));
 
         if (begin == 1) {
             // If the number is negative, we insert a '-' character at front 

Modified: harmony/enhanced/classlib/trunk/modules/math/src/main/java/java/math/Conversion.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/math/src/main/java/java/math/Conversion.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/math/src/main/java/java/math/Conversion.java (original)
+++ harmony/enhanced/classlib/trunk/modules/math/src/main/java/java/math/Conversion.java Thu
Jun 18 09:12:39 2009
@@ -158,7 +158,7 @@
                 case 6:
                     return "0.000000"; //$NON-NLS-1$
                 default:
-                    StringBuffer result1 = new StringBuffer();
+                    StringBuilder result1 = new StringBuilder();
                     if (scale < 0) {
                         result1.append("0E+"); //$NON-NLS-1$
                     } else {
@@ -270,7 +270,7 @@
         }
         int startPoint = currentChar + 1;
         int endPoint = resLengthInChars;
-        StringBuffer result1 = new StringBuffer(16 + endPoint - startPoint);
+        StringBuilder result1 = new StringBuilder(16 + endPoint - startPoint);
         if (negNumber) {
             result1.append('-');
         }
@@ -310,7 +310,7 @@
                 case 5: return "0.00000"; //$NON-NLS-1$
                 case 6: return "0.000000"; //$NON-NLS-1$
                 default:
-                    StringBuffer result1 = new StringBuffer();
+                    StringBuilder result1 = new StringBuilder();
                     if (scale  < 0) {
                         result1.append("0E+"); //$NON-NLS-1$
                     } else {
@@ -370,7 +370,7 @@
         }
         int startPoint = currentChar + 1;
         int endPoint = resLengthInChars;
-        StringBuffer result1 = new StringBuffer(16+endPoint-startPoint);
+        StringBuilder result1 = new StringBuilder(16+endPoint-startPoint);
         if (negNumber) {
             result1.append('-');
         }

Modified: harmony/enhanced/classlib/trunk/modules/math/src/main/java/java/math/MathContext.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/math/src/main/java/java/math/MathContext.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/math/src/main/java/java/math/MathContext.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/math/src/main/java/java/math/MathContext.java
Thu Jun 18 09:12:39 2009
@@ -293,7 +293,7 @@
      */
     @Override
     public String toString() {
-        StringBuffer sb = new StringBuffer(45);
+        StringBuilder sb = new StringBuilder(45);
 
         sb.append(chPrecision);
         sb.append(precision);

Modified: harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/AbstractPreferences.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/AbstractPreferences.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/AbstractPreferences.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/AbstractPreferences.java
Thu Jun 18 09:12:39 2009
@@ -819,7 +819,7 @@
 
     @Override
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(isUserNode() ? "User" : "System"); //$NON-NLS-1$ //$NON-NLS-2$
         sb.append(" Preference Node: "); //$NON-NLS-1$
         sb.append(absolutePath());

Modified: harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/RegistryPreferencesImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/RegistryPreferencesImpl.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/RegistryPreferencesImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/RegistryPreferencesImpl.java
Thu Jun 18 09:12:39 2009
@@ -169,7 +169,7 @@
     // handle the lower/upper case pitfall
     private static String encodeWindowsStr(String str) {
         char[] chars = str.toCharArray();
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         for (int i = 0; i < chars.length; i++) {
             char c = chars[i];
             if (c == '/') {
@@ -186,7 +186,7 @@
     }
 
     private static String decodeWindowsStr(String str) {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         char[] chars = str.toCharArray();
         for (int i = 0; i < chars.length; i++) {
             char c = chars[i];

Modified: harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/XMLParser.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/XMLParser.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/XMLParser.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/XMLParser.java
Thu Jun 18 09:12:39 2009
@@ -318,7 +318,7 @@
     }
 
     private static String htmlEncode(String s) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         char c;
         for (int i = 0; i < s.length(); i++) {
             c = s.charAt(i);

Modified: harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/javax/print/attribute/SetOfIntegerSyntax.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/javax/print/attribute/SetOfIntegerSyntax.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/javax/print/attribute/SetOfIntegerSyntax.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/javax/print/attribute/SetOfIntegerSyntax.java
Thu Jun 18 09:12:39 2009
@@ -280,7 +280,7 @@
 
     @Override
     public String toString() {
-        StringBuffer stringSet = new StringBuffer("");
+        StringBuilder stringSet = new StringBuilder("");
         for (int i = 0; i < canonicalArray.length; i++) {
             if (i > 0) {
                 stringSet.append(",");

Modified: harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/Graphics2D2PS.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/Graphics2D2PS.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/Graphics2D2PS.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/Graphics2D2PS.java
Thu Jun 18 09:12:39 2009
@@ -237,7 +237,7 @@
             return;
         }
 
-        StringBuffer sb = new StringBuffer(text.length());
+        StringBuilder sb = new StringBuilder(text.length());
         int lastX = x;
 
         for (int i = 0; i < text.length(); i++) {
@@ -246,7 +246,7 @@
             } else {
                 if (sb.length() > 0) {
                     lastX += drawPSString(sb.toString(), lastX, y);
-                    sb = new StringBuffer(text.length() - i);
+                    sb = new StringBuilder(text.length() - i);
                 }
 
                 lastX += drawStringShape(String.valueOf(text.charAt(i)), lastX,

Modified: harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/MimeType.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/MimeType.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/MimeType.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/MimeType.java
Thu Jun 18 09:12:39 2009
@@ -82,7 +82,7 @@
      * returns canonical for MimeType object.
      */
     public String getCanonicalForm() {
-        StringBuffer s = new StringBuffer();
+        StringBuilder s = new StringBuilder();
         s.append(aType);
         s.append("/");
         s.append(aSubtype);

Modified: harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/attributes/MediaMargins.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/attributes/MediaMargins.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/attributes/MediaMargins.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/attributes/MediaMargins.java
Thu Jun 18 09:12:39 2009
@@ -268,7 +268,7 @@
      * Throws IllegalArgumentException if units < 1.
      */
     public String toString(int myunits, String unitsName) {
-        StringBuffer s = new StringBuffer();
+        StringBuilder s = new StringBuilder();
         s.append("x1=");
         s.append(getX1(myunits));
         s.append(" y1=");

Modified: harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/ipp/util/IppMimeType.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/ipp/util/IppMimeType.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/ipp/util/IppMimeType.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/print/src/main/java/common/org/apache/harmony/x/print/ipp/util/IppMimeType.java
Thu Jun 18 09:12:39 2009
@@ -33,7 +33,7 @@
      * returns IPP/CUPS specific for MimeType object.
      */
     public String getIppSpecificForm() {
-        StringBuffer s = new StringBuffer();
+        StringBuilder s = new StringBuilder();
         s.append(getType());
         s.append("/");
         s.append(getSubtype());

Modified: harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/CharClass.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/CharClass.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/CharClass.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/CharClass.java
Thu Jun 18 09:12:39 2009
@@ -534,7 +534,7 @@
                 }
 
                 public String toString() {
-                    StringBuffer temp = new StringBuffer();
+                    StringBuilder temp = new StringBuilder();
                     for (int i = bs.nextSetBit(0); i >= 0; i = bs
                             .nextSetBit(i + 1)) {
                         temp.append(Character.toChars(i));
@@ -556,7 +556,7 @@
 
     //for debugging purposes only
     public String toString() {
-        StringBuffer temp = new StringBuffer();
+        StringBuilder temp = new StringBuilder();
         for (int i = bits.nextSetBit(0); i >= 0; i = bits.nextSetBit(i + 1)) {
             temp.append(Character.toChars(i));
             temp.append('|');

Modified: harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/DecomposedCharSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/DecomposedCharSet.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/DecomposedCharSet.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/DecomposedCharSet.java
Thu Jun 18 09:12:39 2009
@@ -195,7 +195,7 @@
      */
     private String getDecomposedChar() {
         if (decomposedCharUTF16 == null) {
-            StringBuffer strBuff = new StringBuffer();
+            StringBuilder strBuff = new StringBuilder();
             
             for (int i = 0; i < decomposedCharLength; i++) {
                 strBuff.append(Character.toChars(decomposedChar[i]));

Modified: harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Lexer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Lexer.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Lexer.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Lexer.java
Thu Jun 18 09:12:39 2009
@@ -353,7 +353,7 @@
         int [] decompHangul;
         
         //result of canonical decomposition of input in UTF-16 encoding
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         
         decompTable = HashDecompositions.getHashDecompositions();
         canonClassesTable = CanClasses.getHashCanClasses();
@@ -853,7 +853,7 @@
      * Parse character classes names and verifies correction of the syntax;
      */
     private String parseCharClassName() {
-        StringBuffer sb = new StringBuffer(10);
+        StringBuilder sb = new StringBuilder(10);
         if (index < pattern.length - 2) {
             // one symbol family
             if (pattern[index] != '{') {
@@ -888,7 +888,7 @@
      * Process given character in assumption that it's quantifier.
      */
     private Quantifier processQuantifier(int ch) {
-        StringBuffer sb = new StringBuffer(4);
+        StringBuilder sb = new StringBuilder(4);
         int min = -1;
         int max = Integer.MAX_VALUE;
         while (index < pattern.length && (ch = pattern[nextIndex()]) != '}') {
@@ -1007,7 +1007,7 @@
      * Process hexadecimal integer. 
      */
     private int readHex(String radixName, int max) {
-        StringBuffer st = new StringBuffer(max);
+        StringBuilder st = new StringBuilder(max);
         int length = pattern.length - 2;
         int i;
         for (i = 0; i < max && index < length; i++) {

Modified: harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java
Thu Jun 18 09:12:39 2009
@@ -109,7 +109,7 @@
             if (replacementParts == null) {
                 return processedRepl;
             } else {
-                StringBuffer sb = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
                 for (int i = 0; i < replacementParts.size(); i++) {
                     sb.append(replacementParts.get(i));
                 }
@@ -119,7 +119,7 @@
         } else {
             this.replacement = replacement;
             char[] repl = replacement.toCharArray();
-            StringBuffer res = new StringBuffer();
+            StringBuilder res = new StringBuilder();
             replacementParts = null;
 
             int index = 0;
@@ -455,7 +455,7 @@
         // first check whether we have smth to quote
         if (s.indexOf('\\') < 0 && s.indexOf('$') < 0)
             return s;
-        StringBuffer res = new StringBuffer(s.length() * 2);
+        StringBuilder res = new StringBuilder(s.length() * 2);
         char ch;
         int len = s.length();
 

Modified: harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Pattern.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Pattern.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Pattern.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Pattern.java
Thu Jun 18 09:12:39 2009
@@ -1378,7 +1378,7 @@
      * @return the quoted string.
      */
     public static String quote(String s) {
-        StringBuffer sb = new StringBuffer().append("\\Q"); //$NON-NLS-1$
+        StringBuilder sb = new StringBuilder().append("\\Q"); //$NON-NLS-1$
         int apos = 0;
         int k;
         while ((k = s.indexOf("\\E", apos)) >= 0) { //$NON-NLS-1$

Modified: harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/UCISequenceSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/UCISequenceSet.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/UCISequenceSet.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/UCISequenceSet.java
Thu Jun 18 09:12:39 2009
@@ -32,7 +32,7 @@
     private String string = null;
 
     UCISequenceSet(StringBuffer substring) {
-        StringBuffer res = new StringBuffer();
+        StringBuilder res = new StringBuilder();
         for (int i = 0; i < substring.length(); i++) {
             res.append(Character.toLowerCase(Character.toUpperCase(substring
                     .charAt(i))));

Modified: harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/EclipseJavaCompiler.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/EclipseJavaCompiler.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/EclipseJavaCompiler.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/EclipseJavaCompiler.java
Thu Jun 18 09:12:39 2009
@@ -140,7 +140,7 @@
      * {@inheritDoc}
      */
     protected int run(String[] args) throws JavaCompilerException {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
 
         for (int i = 0; i < args.length; i++) {
             if (i > 0) {

Modified: harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIUtil.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIUtil.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIUtil.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIUtil.java
Thu Jun 18 09:12:39 2009
@@ -268,7 +268,7 @@
      * @return  Method descriptor.
      */
     public static String getMethodDescriptor(Method method) {
-        StringBuffer buffer = new StringBuffer().append('(');
+        StringBuilder buffer = new StringBuilder().append('(');
         Class[] parameters = method.getParameterTypes();
 
         for (int i = 0; i < parameters.length; i++) {
@@ -308,7 +308,7 @@
      */
     public static String getBasicMethodSignature(Method method) {
         // Start with method name.
-        StringBuffer buffer = new StringBuffer()
+        StringBuilder buffer = new StringBuilder()
                 .append(method.getName()).append('(');
         Class[] parameters = method.getParameterTypes();
 
@@ -336,7 +336,7 @@
      *          getLongMethodSignature(java.lang.reflect.Method)"</code>.
      */
     public static String getLongMethodSignature(Method method) {
-        StringBuffer suffix = new StringBuffer();
+        StringBuilder suffix = new StringBuilder();
         Class cls = method.getReturnType();
 
         // Create signature suffix for array types.
@@ -363,7 +363,7 @@
      */
     public static String getShortMethodSignature(Method method) {
         // Start with method name.
-        StringBuffer buffer = new StringBuffer(method.getName() + '(');
+        StringBuilder buffer = new StringBuilder(method.getName() + '(');
         Class[] parameters = method.getParameterTypes();
 
         // Append short names of parameter types.

Modified: harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/compiler/ClassStub.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/compiler/ClassStub.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/compiler/ClassStub.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/compiler/ClassStub.java
Thu Jun 18 09:12:39 2009
@@ -344,7 +344,7 @@
      * @return  Stub class declaration statement.
      */
     private String getStubClassDeclaration() {
-        StringBuffer buffer = new StringBuffer("public final class " //$NON-NLS-1$
+        StringBuilder buffer = new StringBuilder("public final class " //$NON-NLS-1$
                 + stubName + " extends java.rmi.server.RemoteStub" + EOLN //$NON-NLS-1$
                 + indenter.tIncrease(2) + "implements "); //$NON-NLS-1$
 
@@ -409,7 +409,7 @@
      * @return  <code>operations</code> array declaration statement.
      */
     private String getOperationsArrayDeclaration() {
-        StringBuffer buffer = new StringBuffer(indenter.indent()
+        StringBuilder buffer = new StringBuilder(indenter.indent()
                 + "private static final java.rmi.server.Operation[]" //$NON-NLS-1$
                 + " operations = {"); //$NON-NLS-1$
 
@@ -450,7 +450,7 @@
      * @return  <code>dispatch()</code> method declaration statement.
      */
     private String getDispatchMethod() {
-        StringBuffer buffer = new StringBuffer(indenter.indent()
+        StringBuilder buffer = new StringBuilder(indenter.indent()
                 + "public void dispatch(java.rmi.Remote obj, " //$NON-NLS-1$
                 + "java.rmi.server.RemoteCall call, int opnum, long hash) " //$NON-NLS-1$
                 + "throws java.lang.Exception {" + EOLN + indenter.hIncrease()); //$NON-NLS-1$
@@ -512,7 +512,7 @@
      * @return  Variables declaration block.
      */
     private String getMethodVariablesDeclaration() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
 
         for (Iterator i = methods.iterator(); i.hasNext(); ) {
             buffer.append(((MethodStub) i.next()).getVariableDecl());
@@ -528,7 +528,7 @@
      * @return  Static initialization declaration block.
      */
     private String getStaticInitializationBlock() {
-        StringBuffer buffer = new StringBuffer(indenter.indent()
+        StringBuilder buffer = new StringBuilder(indenter.indent()
                 + "static {" + EOLN + indenter.increase() + "try {" + EOLN //$NON-NLS-1$
//$NON-NLS-2$
                 + indenter.hIncrease());
 
@@ -568,7 +568,7 @@
      * @return  Stub constructors code.
      */
     private String getStubConstructors() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
 
         if (v11) {
             buffer.append(indenter.indent() + "public " + stubName //$NON-NLS-1$
@@ -591,7 +591,7 @@
      * @return  Stub method implementations code.
      */
     private String getMethodImplementations() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
 
         for (Iterator i = methods.iterator(); i.hasNext(); ) {
             buffer.append(EOLN + ((MethodStub) i.next()).getStubImpl());
@@ -778,7 +778,7 @@
          * @return  <code>dispatch()</code> method case for this method.
          */
         String getDispatchCase() {
-            StringBuffer buffer = new StringBuffer(indenter.indent()
+            StringBuilder buffer = new StringBuilder(indenter.indent()
                     + "case " + number + ": {    // " + shortSign + EOLN + EOLN //$NON-NLS-1$
//$NON-NLS-2$
                     + indenter.hIncrease());
 
@@ -873,7 +873,7 @@
          * @return  Method variable initialization.
          */
         String getVariableInit() {
-            StringBuffer buffer = new StringBuffer(indenter.indent()
+            StringBuilder buffer = new StringBuilder(indenter.indent()
                     + varName + " = " + interfaceName + ".class.getMethod(\"" //$NON-NLS-1$
//$NON-NLS-2$
                     + name + "\", new java.lang.Class[] {"); //$NON-NLS-1$
 
@@ -916,7 +916,7 @@
          * @return  Stub implementation header for this method.
          */
         private String getStubImplHeader() {
-            StringBuffer buffer = new StringBuffer(indenter.indent()
+            StringBuilder buffer = new StringBuilder(indenter.indent()
                     + "// Implementation of " + shortSign + EOLN //$NON-NLS-1$
                     + indenter.indent() + "public " + retTypeName //$NON-NLS-1$
                     + ' ' + name + '(');
@@ -949,7 +949,7 @@
          * @return  Stub implementation code for this method.
          */
         private String getStubImplCodeV11() {
-            StringBuffer buffer = new StringBuffer(indenter.indent()
+            StringBuilder buffer = new StringBuilder(indenter.indent()
                     + "java.rmi.server.RemoteCall call = " //$NON-NLS-1$
                     + "ref.newCall((java.rmi.server.RemoteObject) this, " //$NON-NLS-1$
                     + "operations, " + number + ", " + interfaceHashVarName //$NON-NLS-1$
//$NON-NLS-2$
@@ -1016,7 +1016,7 @@
          * @return  Stub implementation code for this method.
          */
         private String getStubImplCodeV12() {
-            StringBuffer buffer = new StringBuffer(indenter.indent());
+            StringBuilder buffer = new StringBuilder(indenter.indent());
 
             if (retType != void.class) {
                 buffer.append("java.lang.Object " + retVarName + " = "); //$NON-NLS-1$ //$NON-NLS-2$
@@ -1057,7 +1057,7 @@
          * @return  Stub implementation catch block for this method.
          */
         private String getStubImplCatchBlock() {
-            StringBuffer buffer = new StringBuffer();
+            StringBuilder buffer = new StringBuilder();
 
             for (Iterator i = catches.iterator(); i.hasNext(); ) {
                 buffer.append(indenter.indent() + "} catch (" //$NON-NLS-1$

Modified: harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/compiler/Indenter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/compiler/Indenter.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/compiler/Indenter.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/compiler/Indenter.java
Thu Jun 18 09:12:39 2009
@@ -203,7 +203,7 @@
      * @return  Increased indent string.
      */
     String tIncrease(int steps) {
-        StringBuffer buffer = new StringBuffer(currentIndent);
+        StringBuilder buffer = new StringBuilder(currentIndent);
 
         for (int i = 0; i < steps; i++) {
             buffer.append(stepString);

Modified: harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/compiler/RmicUtil.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/compiler/RmicUtil.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/compiler/RmicUtil.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/compiler/RmicUtil.java
Thu Jun 18 09:12:39 2009
@@ -55,7 +55,7 @@
      * @return  Suitable name for a parameter.
      */
     static String getParameterName(Class cls, int number) {
-        StringBuffer buffer = new StringBuffer(paramPrefix);
+        StringBuilder buffer = new StringBuilder(paramPrefix);
 
         while (cls.isArray()) {
             buffer.append(arrayPrefix);
@@ -209,7 +209,7 @@
         }
 
         // For all other types, create the respective cast statement.
-        StringBuffer buffer = new StringBuffer("(("); //$NON-NLS-1$
+        StringBuilder buffer = new StringBuilder("(("); //$NON-NLS-1$
         buffer.append(RMIUtil.getCanonicalName(RMIUtil.getWrappingClass(cls)));
         buffer.append(") " + varName + ')'); //$NON-NLS-1$
 

Modified: harmony/enhanced/classlib/trunk/modules/sql/src/main/java/javax/sql/rowset/serial/SQLOutputImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/javax/sql/rowset/serial/SQLOutputImpl.java?rev=785971&r1=785970&r2=785971&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/sql/src/main/java/javax/sql/rowset/serial/SQLOutputImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/sql/src/main/java/javax/sql/rowset/serial/SQLOutputImpl.java
Thu Jun 18 09:12:39 2009
@@ -90,7 +90,7 @@
     @SuppressWarnings("unchecked")
     public void writeAsciiStream(InputStream theStream) throws SQLException {
         BufferedReader br = new BufferedReader(new InputStreamReader(theStream));
-        StringBuffer stringBuffer = new StringBuffer();
+        StringBuilder stringBuffer = new StringBuilder();
         String line;
         try {
             line = br.readLine();
@@ -181,7 +181,7 @@
     @SuppressWarnings("unchecked")
     public void writeCharacterStream(Reader theStream) throws SQLException {
         BufferedReader br = new BufferedReader(theStream);
-        StringBuffer stringBuffer = new StringBuffer();
+        StringBuilder stringBuffer = new StringBuilder();
         String line;
         try {
             line = br.readLine();



Mime
View raw message