Browse Source

merged one hunk the wrong way around, allowableblocksize should remain final

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1340990 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 13 years ago
parent
commit
8f2b4c5f4f
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/main/org/apache/tools/bzip2/CBZip2OutputStream.java

+ 4
- 4
src/main/org/apache/tools/bzip2/CBZip2OutputStream.java View File

@@ -547,7 +547,7 @@ public class CBZip2OutputStream extends OutputStream


private int blockCRC; private int blockCRC;
private int combinedCRC; private int combinedCRC;
private int allowableBlockSize;
private final int allowableBlockSize;


/** /**
* All memory intensive stuff. * All memory intensive stuff.
@@ -635,6 +635,9 @@ public class CBZip2OutputStream extends OutputStream


this.blockSize100k = blockSize; this.blockSize100k = blockSize;
this.out = out; this.out = out;

/* 20 is just a paranoia constant */
this.allowableBlockSize = (this.blockSize100k * BZip2Constants.baseBlockSize) - 20;
init(); init();
} }


@@ -788,9 +791,6 @@ public class CBZip2OutputStream extends OutputStream
for (int i = 256; --i >= 0;) { for (int i = 256; --i >= 0;) {
inUse[i] = false; inUse[i] = false;
} }

/* 20 is just a paranoia constant */
this.allowableBlockSize = (this.blockSize100k * BZip2Constants.baseBlockSize) - 20;
} }


private void endBlock() throws IOException { private void endBlock() throws IOException {


Loading…
Cancel
Save