Author: ebourg
Date: Wed Apr 23 12:26:50 2014
New Revision: 1589383

URL: http://svn.apache.org/r1589383
Log:
Replaced StringBuffers with StringBuilders

Modified:
    
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Signature.java
    
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java
    
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/BCELFactory.java
    
commons/proper/bcel/trunk/src/test/java/org/apache/bcel/AbstractTestCase.java

Modified: 
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Signature.java
URL: 
http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Signature.java?rev=1589383&r1=1589382&r2=1589383&view=diff
==============================================================================
--- 
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Signature.java
 (original)
+++ 
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Signature.java
 Wed Apr 23 12:26:50 2014
@@ -153,7 +153,7 @@ public final class Signature extends Att
     }
 
 
-    private static void matchIdent( MyByteArrayInputStream in, StringBuffer 
buf ) {
+    private static void matchIdent( MyByteArrayInputStream in, StringBuilder 
buf ) {
         int ch;
         if ((ch = in.read()) == -1) {
             throw new RuntimeException("Illegal signature: " + in.getData()
@@ -161,7 +161,7 @@ public final class Signature extends Att
         }
         //System.out.println("return from ident:" + (char)ch);
         if (!identStart(ch)) {
-            StringBuffer buf2 = new StringBuffer();
+            StringBuilder buf2 = new StringBuilder();
             int count = 1;
             while (Character.isJavaIdentifierPart((char) ch)) {
                 buf2.append((char) ch);
@@ -196,7 +196,7 @@ public final class Signature extends Att
     }
 
 
-    private static void matchGJIdent( MyByteArrayInputStream in, StringBuffer 
buf ) {
+    private static void matchGJIdent( MyByteArrayInputStream in, StringBuilder 
buf ) {
         int ch;
         matchIdent(in, buf);
         ch = in.read();
@@ -234,7 +234,7 @@ public final class Signature extends Att
 
     public static String translate( String s ) {
         //System.out.println("Sig:" + s);
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         matchGJIdent(new MyByteArrayInputStream(s), buf);
         return buf.toString();
     }

Modified: 
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java
URL: 
http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java?rev=1589383&r1=1589382&r2=1589383&view=diff
==============================================================================
--- 
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java 
(original)
+++ 
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java 
Wed Apr 23 12:26:50 2014
@@ -741,7 +741,7 @@ public abstract class Utility {
         int index, old_index;
         try {
             if (str.indexOf(old) != -1) { // `old' found in str
-                StringBuffer buf = new StringBuffer();
+                StringBuilder buf = new StringBuilder();
                 old_index = 0; // String start offset
                 // While we have something to replace
                 while ((index = str.indexOf(old, old_index)) != -1) {

Modified: 
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/BCELFactory.java
URL: 
http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/BCELFactory.java?rev=1589383&r1=1589382&r2=1589383&view=diff
==============================================================================
--- 
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/BCELFactory.java 
(original)
+++ 
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/BCELFactory.java 
Wed Apr 23 12:26:50 2014
@@ -271,7 +271,7 @@ class BCELFactory extends EmptyVisitor {
         if (bi instanceof Select) {
             Select s = (Select) bi;
             branches.add(bi);
-            StringBuffer args = new StringBuffer("new int[] { ");
+            StringBuilder args = new StringBuilder("new int[] { ");
             int[] matchs = s.getMatchs();
             for (int i = 0; i < matchs.length; i++) {
                 args.append(matchs[i]);

Modified: 
commons/proper/bcel/trunk/src/test/java/org/apache/bcel/AbstractTestCase.java
URL: 
http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/AbstractTestCase.java?rev=1589383&r1=1589382&r2=1589383&view=diff
==============================================================================
--- 
commons/proper/bcel/trunk/src/test/java/org/apache/bcel/AbstractTestCase.java 
(original)
+++ 
commons/proper/bcel/trunk/src/test/java/org/apache/bcel/AbstractTestCase.java 
Wed Apr 23 12:26:50 2014
@@ -121,7 +121,7 @@ public abstract class AbstractTestCase e
 
        protected String dumpAttributes(Attribute[] as)
        {
-               StringBuffer result = new StringBuffer();
+               StringBuilder result = new StringBuilder();
                result.append("AttributeArray:[");
                for (int i = 0; i < as.length; i++)
                {
@@ -137,7 +137,7 @@ public abstract class AbstractTestCase e
 
        protected String dumpAnnotationEntries(AnnotationEntry[] as)
        {
-               StringBuffer result = new StringBuffer();
+               StringBuilder result = new StringBuilder();
                result.append("[");
                for (int i = 0; i < as.length; i++)
                {
@@ -153,7 +153,7 @@ public abstract class AbstractTestCase e
 
        protected String dumpAnnotationEntries(AnnotationEntryGen[] as)
        {
-               StringBuffer result = new StringBuffer();
+               StringBuilder result = new StringBuilder();
                result.append("[");
                for (int i = 0; i < as.length; i++)
                {


Reply via email to