commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r1475836 - in /commons/proper/fileupload/trunk/src: main/java/org/apache/commons/fileupload/util/ test/java/org/apache/commons/fileupload/
Date Thu, 25 Apr 2013 16:05:12 GMT
Author: ebourg
Date: Thu Apr 25 16:05:12 2013
New Revision: 1475836

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

Modified:
    commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/Streams.java
    commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DefaultFileItemTest.java
    commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DiskFileItemSerializeTest.java
    commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/HttpServletRequestFactory.java

Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/Streams.java
URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/Streams.java?rev=1475836&r1=1475835&r2=1475836&view=diff
==============================================================================
--- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/Streams.java
(original)
+++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/Streams.java
Thu Apr 25 16:05:12 2013
@@ -186,7 +186,7 @@ public final class Streams {
     public static String checkFileName(String pFileName) {
         if (pFileName != null  &&  pFileName.indexOf('\u0000') != -1) {
             // pFileName.replace("\u0000", "\\0")
-            final StringBuffer sb = new StringBuffer();
+            final StringBuilder sb = new StringBuilder();
             for (int i = 0;  i < pFileName.length();  i++) {
                 char c = pFileName.charAt(i);
                 switch (c) {

Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DefaultFileItemTest.java
URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DefaultFileItemTest.java?rev=1475836&r1=1475835&r2=1475836&view=diff
==============================================================================
--- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DefaultFileItemTest.java
(original)
+++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DefaultFileItemTest.java
Thu Apr 25 16:05:12 2013
@@ -257,7 +257,7 @@ public class DefaultFileItemTest {
     };
 
     private static String constructString(int[] unicodeChars) {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         if (unicodeChars != null) {
             for (int i = 0; i < unicodeChars.length; i++) {
                 buffer.append((char) unicodeChars[i]);

Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DiskFileItemSerializeTest.java
URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DiskFileItemSerializeTest.java?rev=1475836&r1=1475835&r2=1475836&view=diff
==============================================================================
--- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DiskFileItemSerializeTest.java
(original)
+++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DiskFileItemSerializeTest.java
Thu Apr 25 16:05:12 2013
@@ -156,7 +156,7 @@ public class DiskFileItemSerializeTest {
      * Create content bytes of a specified size.
      */
     private byte[] createContentBytes(int size) {
-        StringBuffer buffer = new StringBuffer(size);
+        StringBuilder buffer = new StringBuilder(size);
         byte count = 0;
         for (int i = 0; i < size; i++) {
             buffer.append(count+"");

Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/HttpServletRequestFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/HttpServletRequestFactory.java?rev=1475836&r1=1475835&r2=1475836&view=diff
==============================================================================
--- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/HttpServletRequestFactory.java
(original)
+++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/HttpServletRequestFactory.java
Thu Apr 25 16:05:12 2013
@@ -34,7 +34,7 @@ final class HttpServletRequestFactory {
             final String[] strFileNames) {
         // todo - provide a real implementation
 
-        StringBuffer sbRequestData = new StringBuffer();
+        StringBuilder sbRequestData = new StringBuilder();
 
         for (int i = 0; i < strFileNames.length; i++)
         {



Mime
View raw message