ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1340990 - /ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java
Date Mon, 21 May 2012 12:28:19 GMT
Author: bodewig
Date: Mon May 21 12:28:19 2012
New Revision: 1340990

URL: http://svn.apache.org/viewvc?rev=1340990&view=rev
Log:
merged one hunk the wrong way around, allowableblocksize should remain final

Modified:
    ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java   (contents, props
changed)

Modified: ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java?rev=1340990&r1=1340989&r2=1340990&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java Mon May 21 12:28:19
2012
@@ -547,7 +547,7 @@ public class CBZip2OutputStream extends 
 
     private int blockCRC;
     private int combinedCRC;
-    private int allowableBlockSize;
+    private final int allowableBlockSize;
 
     /**
      * All memory intensive stuff.
@@ -635,6 +635,9 @@ public class CBZip2OutputStream extends 
 
         this.blockSize100k = blockSize;
         this.out = out;
+
+        /* 20 is just a paranoia constant */
+        this.allowableBlockSize = (this.blockSize100k * BZip2Constants.baseBlockSize) - 20;
         init();
     }
 
@@ -788,9 +791,6 @@ public class CBZip2OutputStream extends 
         for (int i = 256; --i >= 0;) {
             inUse[i] = false;
         }
-
-        /* 20 is just a paranoia constant */
-        this.allowableBlockSize = (this.blockSize100k * BZip2Constants.baseBlockSize) - 20;
     }
 
     private void endBlock() throws IOException {

Propchange: ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java
------------------------------------------------------------------------------
  Merged /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java:r1340962



Mime
View raw message