This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-compress.git
commit cabafcde695599f2bf6f8b85d4f15405b9bffa92 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Tue Mar 5 09:12:06 2024 -0500 Use local variable instead of instance variable --- .../compress/compressors/bzip2/BZip2CompressorInputStream.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java index 6ceb87920..efcf76c53 100644 --- a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java +++ b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java @@ -230,7 +230,7 @@ public class BZip2CompressorInputStream extends CompressorInputStream implements private final boolean decompressConcatenated; private int currentState = START_BLOCK_STATE; private int storedBlockCRC, storedCombinedCRC; - private int computedBlockCRC, computedCombinedCRC; + private int computedCombinedCRC; private int su_count; private int su_ch2; @@ -340,10 +340,10 @@ public class BZip2CompressorInputStream extends CompressorInputStream implements } private void endBlock() throws IOException { - this.computedBlockCRC = this.crc.getValue(); + final int computedBlockCRC = this.crc.getValue(); // A bad CRC is considered a fatal error. - if (this.storedBlockCRC != this.computedBlockCRC) { + if (this.storedBlockCRC != computedBlockCRC) { // make next blocks readable without error // (repair feature, not yet documented, not tested) this.computedCombinedCRC = this.storedCombinedCRC << 1 | this.storedCombinedCRC >>> 31; @@ -353,7 +353,7 @@ public class BZip2CompressorInputStream extends CompressorInputStream implements } this.computedCombinedCRC = this.computedCombinedCRC << 1 | this.computedCombinedCRC >>> 31; - this.computedCombinedCRC ^= this.computedBlockCRC; + this.computedCombinedCRC ^= computedBlockCRC; } private void getAndMoveToFrontDecode() throws IOException {