commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r1511322 - in /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress: archivers/cpio/ archivers/tar/ utils/
Date Wed, 07 Aug 2013 14:07:11 GMT
Author: ebourg
Date: Wed Aug  7 14:07:10 2013
New Revision: 1511322

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

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/ArchiveUtils.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java?rev=1511322&r1=1511321&r2=1511322&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
Wed Aug  7 14:07:10 2013
@@ -44,7 +44,7 @@ import org.apache.commons.compress.utils
  * while ((cpioEntry = cpioIn.getNextEntry()) != null) {
  *     System.out.println(cpioEntry.getName());
  *     int tmp;
- *     StringBuffer buf = new StringBuffer();
+ *     StringBuilder buf = new StringBuilder();
  *     while ((tmp = cpIn.read()) != -1) {
  *         buf.append((char) tmp);
  *     }

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java?rev=1511322&r1=1511321&r2=1511322&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java
Wed Aug  7 14:07:10 2013
@@ -455,7 +455,7 @@ public class CpioArchiveOutputStream ext
 
     private void writeAsciiLong(final long number, final int length,
             final int radix) throws IOException {
-        StringBuffer tmp = new StringBuffer();
+        StringBuilder tmp = new StringBuilder();
         String tmpStr;
         if (radix == 16) {
             tmp.append(Long.toHexString(number));

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java?rev=1511322&r1=1511321&r2=1511322&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
Wed Aug  7 14:07:10 2013
@@ -496,7 +496,7 @@ public class TarArchiveOutputStream exte
 
     private String stripTo7Bits(String name) {
         final int length = name.length();
-        StringBuffer result = new StringBuffer(length);
+        StringBuilder result = new StringBuilder(length);
         for (int i = 0; i < length; i++) {
             char stripped = (char) (name.charAt(i) & 0x7F);
             if (stripped != 0) { // would be read as Trailing null
@@ -520,7 +520,6 @@ public class TarArchiveOutputStream exte
         out.flush();
     }
 
-    /** {@inheritDoc} */
     @Override
     public ArchiveEntry createArchiveEntry(File inputFile, String entryName)
             throws IOException {

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java?rev=1511322&r1=1511321&r2=1511322&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
Wed Aug  7 14:07:10 2013
@@ -60,7 +60,7 @@ public class TarUtils {
 
             public String decode(byte[] buffer) {
                 final int length = buffer.length;
-                StringBuffer result = new StringBuffer(length);
+                StringBuilder result = new StringBuilder(length);
 
                 for (int i = 0; i < length; ++i) {
                     byte b = buffer[i];

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/ArchiveUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/ArchiveUtils.java?rev=1511322&r1=1511321&r2=1511322&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/ArchiveUtils.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/ArchiveUtils.java
Wed Aug  7 14:07:10 2013
@@ -41,7 +41,7 @@ public class ArchiveUtils {
      * @return the representation of the entry
      */
     public static String toString(ArchiveEntry entry){
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(entry.isDirectory()? 'd' : '-');// c.f. "ls -l" output
         String size = Long.toString((entry.getSize()));
         sb.append(' ');



Mime
View raw message