commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1430074 - in /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers: ar/ArArchiveInputStream.java cpio/CpioArchiveInputStream.java zip/ZipArchiveInputStream.java zip/ZipFile.java
Date Mon, 07 Jan 2013 22:54:12 GMT
Author: sebb
Date: Mon Jan  7 22:54:12 2013
New Revision: 1430074

URL: http://svn.apache.org/viewvc?rev=1430074&view=rev
Log:
Document why local buffers are used (and restrictions on their use)

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
    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/zip/ZipArchiveInputStream.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java?rev=1430074&r1=1430073&r2=1430074&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
Mon Jan  7 22:54:12 2013
@@ -53,7 +53,7 @@ public class ArArchiveInputStream extend
      */
     private long entryOffset = -1;
 
-    // cached buffers
+    // cached buffers - must only be used locally in the class (COMPRESS-172 - reduce garbage
collection)
     private final byte[] NAME_BUF = new byte[16];
     private final byte[] LAST_MODIFIED_BUF = new byte[12];
     private final byte[] ID_BUF = new byte[6];

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=1430074&r1=1430073&r2=1430074&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
Mon Jan  7 22:54:12 2013
@@ -77,7 +77,7 @@ public class CpioArchiveInputStream exte
 
     private final InputStream in;
 
-    // cached buffers
+    // cached buffers - must only be used locally in the class (COMPRESS-172 - reduce garbage
collection)
     private final byte[] TWO_BYTES_BUF = new byte[2];
     private final byte[] FOUR_BYTES_BUF = new byte[4];
     private final byte[] SIX_BYTES_BUF = new byte[6];

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java?rev=1430074&r1=1430073&r2=1430074&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
Mon Jan  7 22:54:12 2013
@@ -128,7 +128,7 @@ public class ZipArchiveInputStream exten
 
     private static final long TWO_EXP_32 = ZIP64_MAGIC + 1;
 
-    // cached buffers
+    // cached buffers - must only be used locally in the class (COMPRESS-172 - reduce garbage
collection)
     private final byte[] LFH_BUF = new byte[LFH_LEN];
     private final byte[] SKIP_BUF = new byte[1024];
     private final byte[] WORD_BUF = new byte[WORD];

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java?rev=1430074&r1=1430073&r2=1430074&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
Mon Jan  7 22:54:12 2013
@@ -132,7 +132,7 @@ public class ZipFile {
      */
     private boolean closed;
 
-    // cached buffers
+    // cached buffers - must only be used locally in the class (COMPRESS-172 - reduce garbage
collection)
     private final byte[] DWORD_BUF = new byte[DWORD];
     private final byte[] WORD_BUF = new byte[WORD];
     private final byte[] CFH_BUF = new byte[CFH_LEN];



Mime
View raw message