commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1333715 - in /commons/proper/codec/trunk/src/test/java/org/apache/commons/codec: binary/ language/ language/bm/ net/
Date Fri, 04 May 2012 00:57:45 GMT
Author: sebb
Date: Fri May  4 00:57:44 2012
New Revision: 1333715

URL: http://svn.apache.org/viewvc?rev=1333715&view=rev
Log:
Replace StringBuffer with non-synch Builder

Modified:
    commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base64Test.java
    commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/DoubleMetaphoneTest.java
    commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java
    commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/BCodecTest.java
    commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/QCodecTest.java
    commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/QuotedPrintableCodecTest.java
    commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/URLCodecTest.java

Modified: commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base64Test.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base64Test.java?rev=1333715&r1=1333714&r2=1333715&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base64Test.java
(original)
+++ commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base64Test.java
Fri May  4 00:57:44 2012
@@ -289,7 +289,7 @@ public class Base64Test {
         String orig = "I am a late night coder.";
 
         byte[] encodedArray = Base64.encodeBase64(orig.getBytes(Charsets.UTF_8));
-        StringBuffer intermediate = new StringBuffer(new String(encodedArray));
+        StringBuilder intermediate = new StringBuilder(new String(encodedArray));
 
         intermediate.insert(2, ' ');
         intermediate.insert(5, '\t');
@@ -1208,7 +1208,7 @@ public class Base64Test {
     }
 
     private String toString(byte[] data) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         for (int i = 0; i < data.length; i++) {
             buf.append(data[i]);
             if (i != data.length - 1) {

Modified: commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/DoubleMetaphoneTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/DoubleMetaphoneTest.java?rev=1333715&r1=1333714&r2=1333715&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/DoubleMetaphoneTest.java
(original)
+++ commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/DoubleMetaphoneTest.java
Fri May  4 00:57:44 2012
@@ -1172,8 +1172,8 @@ public class DoubleMetaphoneTest extends
     @Test
     public void testIsDoubleMetaphoneEqualExtended3() {
         this.validateFixture(FIXTURE);
-        StringBuffer failures = new StringBuffer();
-        StringBuffer matches = new StringBuffer();
+        StringBuilder failures = new StringBuilder();
+        StringBuilder matches = new StringBuilder();
         String cr = System.getProperty("line.separator");
         matches.append("private static final String[][] MATCHES = {" + cr);
         int failCount = 0;

Modified: commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java?rev=1333715&r1=1333714&r2=1333715&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java
(original)
+++ commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java
Fri May  4 00:57:44 2012
@@ -190,7 +190,7 @@ public class BeiderMorseEncoderTest exte
     @Test(/* timeout = 20000L */)
     public void testSpeedCheck() throws EncoderException {
         BeiderMorseEncoder bmpm = this.createGenericApproxEncoder();
-        StringBuffer stringBuffer = new StringBuffer();
+        StringBuilder stringBuffer = new StringBuilder();
         stringBuffer.append(TEST_CHARS[0]);
         for (int i = 0, j = 1; i < 40; i++, j++) {
             if (j == TEST_CHARS.length) {

Modified: commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/BCodecTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/BCodecTest.java?rev=1333715&r1=1333714&r2=1333715&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/BCodecTest.java
(original)
+++ commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/BCodecTest.java
Fri May  4 00:57:44 2012
@@ -42,7 +42,7 @@ public class BCodecTest {
         { 0x412, 0x441, 0x435, 0x43C, 0x5F, 0x43F, 0x440, 0x438, 0x432, 0x435, 0x442 };
 
     private String constructString(int[] unicodeChars) {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         if (unicodeChars != null) {
             for (int unicodeChar : unicodeChars) {
                 buffer.append((char) unicodeChar);

Modified: commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/QCodecTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/QCodecTest.java?rev=1333715&r1=1333714&r2=1333715&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/QCodecTest.java
(original)
+++ commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/QCodecTest.java
Fri May  4 00:57:44 2012
@@ -48,7 +48,7 @@ public class QCodecTest {
     }; 
 
     private String constructString(int [] unicodeChars) {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         if (unicodeChars != null) {
             for (int unicodeChar : unicodeChars) {
                 buffer.append((char)unicodeChar); 

Modified: commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/QuotedPrintableCodecTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/QuotedPrintableCodecTest.java?rev=1333715&r1=1333714&r2=1333715&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/QuotedPrintableCodecTest.java
(original)
+++ commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/QuotedPrintableCodecTest.java
Fri May  4 00:57:44 2012
@@ -47,7 +47,7 @@ public class QuotedPrintableCodecTest {
     }; 
 
     private String constructString(int [] unicodeChars) {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         if (unicodeChars != null) {
             for (int unicodeChar : unicodeChars) {
                 buffer.append((char)unicodeChar); 

Modified: commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/URLCodecTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/URLCodecTest.java?rev=1333715&r1=1333714&r2=1333715&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/URLCodecTest.java
(original)
+++ commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/net/URLCodecTest.java
Fri May  4 00:57:44 2012
@@ -50,7 +50,7 @@ public class URLCodecTest {
     }
     
     private String constructString(int [] unicodeChars) {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         if (unicodeChars != null) {
             for (int unicodeChar : unicodeChars) {
                 buffer.append((char)unicodeChar); 



Mime
View raw message