You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/08/08 22:19:30 UTC

[commons-compress] branch master updated (06e05da -> 1c13587)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git.


    from 06e05da  - Add TarArchiveOutputStream.createArchiveEntry(Path, String, LinkOption...). - Add IOUtils.EMPTY_LINK_OPTIONS. - Update new ctor TarArchiveEntry(Path, String, LinkOption...)
     new f3afb6e  Use final.
     new e0b3b1c  Remove trailing whitespace.
     new 1c13587  - Remove unused imports. - Use Java 7 diamonds. - Better boolean test. - Remove redundant modifiers. - Remove redundant ;

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../commons/compress/MemoryLimitException.java     |   6 +-
 .../compress/archivers/ArchiveOutputStream.java    |   2 +-
 .../compress/archivers/ArchiveStreamFactory.java   |  22 +--
 .../apache/commons/compress/archivers/Lister.java  |  14 +-
 .../compress/archivers/ar/ArArchiveEntry.java      |   2 +-
 .../archivers/ar/ArArchiveInputStream.java         |  12 +-
 .../archivers/ar/ArArchiveOutputStream.java        |   4 +-
 .../compress/archivers/arj/ArjArchiveEntry.java    |   2 +-
 .../compress/archivers/arj/LocalFileHeader.java    |   2 +-
 .../compress/archivers/cpio/CpioArchiveEntry.java  |   8 +-
 .../archivers/cpio/CpioArchiveOutputStream.java    |  10 +-
 .../compress/archivers/dump/TapeInputStream.java   |   6 +-
 .../archivers/examples/CloseableConsumer.java      |   8 +-
 .../examples/CloseableConsumerAdapter.java         |   4 +-
 .../compress/archivers/examples/Expander.java      |  38 ++---
 .../archivers/sevenz/AES256SHA256Decoder.java      |   2 +-
 .../BoundedSeekableByteChannelInputStream.java     |   6 +-
 .../commons/compress/archivers/sevenz/Coders.java  |  20 +--
 .../compress/archivers/sevenz/DeltaDecoder.java    |   2 +-
 .../compress/archivers/sevenz/LZMA2Decoder.java    |   2 +-
 .../compress/archivers/sevenz/LZMADecoder.java     |  14 +-
 .../archivers/sevenz/SevenZArchiveEntry.java       |  10 +-
 .../compress/archivers/sevenz/SevenZFile.java      |  72 ++++-----
 .../archivers/sevenz/SevenZFileOptions.java        |   6 +-
 .../sevenz/SevenZMethodConfiguration.java          |   2 +-
 .../archivers/sevenz/SevenZOutputFile.java         |   6 +-
 .../compress/archivers/tar/TarArchiveEntry.java    |  38 ++---
 .../archivers/tar/TarArchiveInputStream.java       |  44 +++---
 .../archivers/tar/TarArchiveOutputStream.java      |   8 +-
 .../archivers/tar/TarArchiveSparseEntry.java       |   4 +-
 .../archivers/tar/TarArchiveStructSparse.java      |   6 +-
 .../commons/compress/archivers/tar/TarUtils.java   |   4 +-
 .../archivers/zip/ExplodingInputStream.java        |   2 +-
 .../compress/archivers/zip/ExtraFieldUtils.java    |  18 +--
 .../zip/InflaterInputStreamWithStatistics.java     |   8 +-
 .../compress/archivers/zip/NioZipEncoding.java     |  24 +--
 .../archivers/zip/ParallelScatterZipCreator.java   |   8 +-
 .../archivers/zip/ResourceAlignmentExtraField.java |  14 +-
 .../archivers/zip/ScatterZipOutputStream.java      |   6 +-
 .../compress/archivers/zip/StreamCompressor.java   |   8 +-
 .../archivers/zip/X5455_ExtendedTimestamp.java     |   4 +-
 .../compress/archivers/zip/X7875_NewUnix.java      |   4 +-
 .../compress/archivers/zip/ZipArchiveEntry.java    |  62 ++++----
 .../archivers/zip/ZipArchiveInputStream.java       |  22 +--
 .../archivers/zip/ZipArchiveOutputStream.java      |  53 ++++---
 .../compress/archivers/zip/ZipEncodingHelper.java  |   6 +-
 .../commons/compress/archivers/zip/ZipFile.java    |  32 ++--
 .../commons/compress/archivers/zip/ZipLong.java    |   4 +-
 .../archivers/zip/ZipSplitOutputStream.java        |  24 +--
 .../zip/ZipSplitReadOnlySeekableByteChannel.java   |  54 +++----
 .../compressors/CompressorStreamFactory.java       |   4 +-
 .../bzip2/BZip2CompressorInputStream.java          |  18 +--
 .../deflate64/Deflate64CompressorInputStream.java  |  10 +-
 .../compressors/deflate64/HuffmanDecoder.java      | 110 +++++++-------
 .../lz4/BlockLZ4CompressorInputStream.java         |  10 +-
 .../lz4/BlockLZ4CompressorOutputStream.java        | 114 +++++++--------
 .../lz4/FramedLZ4CompressorInputStream.java        |  56 +++----
 .../lz4/FramedLZ4CompressorOutputStream.java       |  36 ++---
 .../commons/compress/compressors/lz4/XXHash32.java |  10 +-
 .../AbstractLZ77CompressorInputStream.java         |  16 +-
 .../compressors/lz77support/LZ77Compressor.java    |  36 ++---
 .../compressors/lz77support/Parameters.java        |  36 ++---
 .../lzma/LZMACompressorInputStream.java            |   4 +-
 .../compress/compressors/lzw/LZWInputStream.java   |   4 +-
 .../snappy/FramedSnappyCompressorOutputStream.java |  12 +-
 .../compressors/snappy/PureJavaCrc32C.java         |   2 +-
 .../snappy/SnappyCompressorInputStream.java        |  10 +-
 .../snappy/SnappyCompressorOutputStream.java       |  38 ++---
 .../compressors/xz/XZCompressorInputStream.java    |  10 +-
 .../zstandard/ZstdCompressorOutputStream.java      |   8 +-
 .../FileBasedScatterGatherBackingStore.java        |   4 +-
 .../commons/compress/utils/BitInputStream.java     |  10 +-
 .../commons/compress/utils/BoundedInputStream.java |   4 +-
 .../apache/commons/compress/utils/ByteUtils.java   |  30 ++--
 .../utils/CloseShieldFilterInputStream.java        |   2 +-
 .../commons/compress/utils/FileNameUtils.java      |  12 +-
 .../utils/FixedLengthBlockOutputStream.java        |  42 +++---
 .../utils/FlushShieldFilterOutputStream.java       |   2 +-
 .../org/apache/commons/compress/utils/IOUtils.java |   9 +-
 .../utils/MultiReadOnlySeekableByteChannel.java    |  30 ++--
 .../utils/SeekableInMemoryByteChannel.java         |  20 +--
 .../org/apache/commons/compress/utils/Sets.java    |   2 +-
 .../compress/utils/SkipShieldingInputStream.java   |   4 +-
 .../apache/commons/compress/AbstractTestCase.java  |   2 +-
 .../apache/commons/compress/ArchiveReadTest.java   |   2 +-
 .../apache/commons/compress/ArchiveUtilsTest.java  |  10 +-
 .../commons/compress/MockEvilInputStream.java      |   2 +-
 .../archivers/ArchiveOutputStreamTest.java         |   4 +-
 .../archivers/ArchiveStreamFactoryTest.java        |  10 +-
 .../commons/compress/archivers/LongPathTest.java   |   2 +-
 .../compress/archivers/LongSymLinkTest.java        |   2 +-
 .../commons/compress/archivers/SevenZTestCase.java |   6 +-
 .../commons/compress/archivers/ZipTestCase.java    |  70 ++++-----
 .../archivers/ar/ArArchiveInputStreamTest.java     |  10 +-
 .../archivers/arj/ArjArchiveInputStreamTest.java   |   6 +-
 .../compress/archivers/arj/CoverageTest.java       |   4 +-
 .../archivers/cpio/CpioArchiveInputStreamTest.java |   6 +-
 .../compress/archivers/cpio/CpioArchiveTest.java   |   6 +-
 .../compress/archivers/cpio/CpioUtilTest.java      |   2 +-
 .../archivers/dump/DumpArchiveInputStreamTest.java |   6 +-
 .../compress/archivers/examples/ExpanderTest.java  |  18 +--
 .../examples/ParameterizedArchiverTest.java        |  14 +-
 .../examples/ParameterizedExpanderTest.java        |  10 +-
 .../archivers/examples/SevenZArchiverTest.java     |  12 +-
 .../compress/archivers/jar/JarMarkerTest.java      |   4 +-
 .../archivers/sevenz/AES256SHA256DecoderTest.java  |  12 +-
 .../compress/archivers/sevenz/CoverageTest.java    |   4 +-
 .../compress/archivers/sevenz/FolderTest.java      |  20 +--
 .../archivers/sevenz/SevenZArchiveEntryTest.java   |  22 +--
 .../compress/archivers/sevenz/SevenZFileTest.java  |  48 +++---
 .../archivers/sevenz/SevenZNativeHeapTest.java     |  34 ++---
 .../compress/archivers/tar/SparseFilesTest.java    |  14 +-
 .../archivers/tar/TarArchiveEntryTest.java         |  16 +-
 .../archivers/tar/TarArchiveInputStreamTest.java   |  30 ++--
 .../archivers/tar/TarArchiveOutputStreamTest.java  |  44 +++---
 .../archivers/tar/TarMemoryFileSystemTest.java     |   6 +-
 .../compress/archivers/tar/TarUtilsTest.java       |   4 +-
 .../compress/archivers/zip/BinaryTreeTest.java     |   8 +-
 .../compress/archivers/zip/DataDescriptorTest.java |  90 ++++++------
 .../compress/archivers/zip/ExplodeSupportTest.java |   8 +-
 .../archivers/zip/ExtraFieldUtilsTest.java         |   8 +-
 .../archivers/zip/Maven221MultiVolumeTest.java     |   2 +-
 .../compress/archivers/zip/NioZipEncodingTest.java |  42 +++---
 .../zip/ParallelScatterZipCreatorTest.java         |  18 +--
 .../archivers/zip/PkWareExtraHeaderTest.java       |  12 +-
 .../archivers/zip/StreamCompressorTest.java        |   2 +-
 .../archivers/zip/X5455_ExtendedTimestampTest.java |   2 +-
 .../compress/archivers/zip/Zip64SupportIT.java     |   6 +-
 .../archivers/zip/ZipArchiveEntryTest.java         |  40 ++---
 .../archivers/zip/ZipArchiveInputStreamTest.java   |  92 ++++++------
 .../archivers/zip/ZipClassCoverageTest.java        |  12 +-
 .../compress/archivers/zip/ZipEncodingTest.java    |   8 +-
 .../zip/ZipFileIgnoringLocalFileHeaderTest.java    |  12 +-
 .../compress/archivers/zip/ZipFileTest.java        | 162 ++++++++++-----------
 .../archivers/zip/ZipSplitOutputStreamTest.java    |  22 +--
 .../compress/archivers/zip/ZipUtilTest.java        |   4 +-
 .../commons/compress/changes/ChangeTest.java       |  10 +-
 .../compressors/DetectCompressorTestCase.java      |  14 +-
 .../compress/compressors/FramedSnappyTestCase.java |  20 +--
 .../commons/compress/compressors/GZipTestCase.java |   2 +-
 .../commons/compress/compressors/LZMATestCase.java |   2 +-
 .../compress/compressors/Pack200TestCase.java      |   6 +-
 .../brotli/BrotliCompressorInputStreamTest.java    |   2 +-
 .../bzip2/BZip2CompressorInputStreamTest.java      |   4 +-
 .../deflate/DeflateCompressorInputStreamTest.java  |   2 +-
 .../compressors/deflate64/Deflate64BugsTest.java   |   8 +-
 .../Deflate64CompressorInputStreamTest.java        |  22 +--
 .../compressors/deflate64/HuffmanDecoderTest.java  |  52 +++----
 .../lz4/BlockLZ4CompressorInputStreamTest.java     |   6 +-
 .../lz4/BlockLZ4CompressorOutputStreamTest.java    | 110 +++++++-------
 .../lz4/BlockLZ4CompressorRoundtripTest.java       |  10 +-
 .../compress/compressors/lz4/FactoryTest.java      |   8 +-
 .../lz4/FramedLZ4CompressorInputStreamTest.java    | 132 ++++++++---------
 .../lz4/FramedLZ4CompressorRoundtripTest.java      |  10 +-
 .../compress/compressors/lz4/XXHash32Test.java     |   6 +-
 .../AbstractLZ77CompressorInputStreamTest.java     |  14 +-
 .../lz77support/LZ77CompressorTest.java            |  74 +++++-----
 .../compressors/lz77support/ParametersTest.java    |  30 ++--
 .../FramedSnappyCompressorInputStreamTest.java     |   8 +-
 .../compressors/snappy/SnappyRoundtripTest.java    |  34 ++---
 .../xz/XZCompressorInputStreamTest.java            |   6 +-
 .../xz/XZCompressorOutputStreamTest.java           |   2 +-
 .../compressors/z/ZCompressorInputStreamTest.java  |   6 +-
 .../zstandard/ZstdCompressorInputStreamTest.java   |   8 +-
 .../compressors/zstandard/ZstdRoundtripTest.java   |  22 +--
 .../commons/compress/utils/BitInputStreamTest.java |   4 +-
 .../commons/compress/utils/ByteUtilsTest.java      |  48 +++---
 .../utils/ChecksumCalculatingInputStreamTest.java  |  50 +++----
 .../utils/ChecksumVerifyingInputStreamTest.java    |  28 ++--
 .../utils/FixedLengthBlockOutputStreamTest.java    | 146 +++++++++----------
 .../apache/commons/compress/utils/IOUtilsTest.java |   8 +-
 .../MultiReadOnlySeekableByteChannelTest.java      |  44 +++---
 .../utils/SeekableInMemoryByteChannelTest.java     |  70 ++++-----
 .../compress/utils/ServiceLoaderIteratorTest.java  |  14 +-
 .../ZipSplitReadOnlySeekableByteChannelTest.java   |  62 ++++----
 175 files changed, 1783 insertions(+), 1787 deletions(-)


[commons-compress] 02/03: Remove trailing whitespace.

Posted by gg...@apache.org.
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 e0b3b1c7e036c9659c666d4a148d898a66c40579
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Aug 8 18:09:09 2020 -0400

    Remove trailing whitespace.
---
 .../apache/commons/compress/archivers/ar/ArArchiveOutputStream.java   | 2 +-
 .../org/apache/commons/compress/archivers/tar/TarArchiveEntry.java    | 2 +-
 .../apache/commons/compress/archivers/tar/TarArchiveOutputStream.java | 2 +-
 .../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java    | 4 ++--
 .../apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java | 2 +-
 .../apache/commons/compress/compressors/deflate64/HuffmanDecoder.java | 2 +-
 .../commons/compress/compressors/lz77support/LZ77Compressor.java      | 2 +-
 src/main/java/org/apache/commons/compress/utils/IOUtils.java          | 2 +-
 src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java  | 2 +-
 .../compress/compressors/zstandard/ZstdCompressorInputStreamTest.java | 4 ++--
 10 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java
index d2ace3b..6efd879 100644
--- a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java
@@ -227,7 +227,7 @@ public class ArArchiveOutputStream extends ArchiveOutputStream {
         }
         return new ArArchiveEntry(inputFile, entryName);
     }
-    
+
     /**
      * {@inheritDoc}
      *
diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
index a1f546e..6b79f72 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
@@ -237,7 +237,7 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
 
     /** The entry's file reference */
     private final Path file;
-    
+
     /** The entry's file linkOptions*/
     private final LinkOption[] linkOptions;
 
diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
index ece14d1..68e8f51 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
@@ -558,7 +558,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
         }
         return new TarArchiveEntry(inputFile, entryName);
     }
-    
+
     @Override
     public ArchiveEntry createArchiveEntry(final Path inputPath, final String entryName, final LinkOption... options) throws IOException {
         if (finished) {
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
index 2c3ed74..b611bda 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
@@ -245,7 +245,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
      * @param entryName name of the entry.
      * @param options options indicating how symbolic links are handled.
      * @throws IOException if an I/O error occurs.
-     * @since 1.21 
+     * @since 1.21
      */
     public ZipArchiveEntry(final Path inputPath, final String entryName, final LinkOption... options) throws IOException {
         this(Files.isDirectory(inputPath, options) && !entryName.endsWith("/") ?
@@ -260,7 +260,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
     /**
      * Sets the modification time of the entry.
      * @param fileTime the entry modification time.
-     * @since 1.21 
+     * @since 1.21
      */
     public void setTime(final FileTime fileTime) {
         setTime(fileTime.toMillis());
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
index f4c775e..eef673b 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
@@ -1785,7 +1785,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
      * @param inputPath path to create the entry from.
      * @param entryName name of the entry.
      * @param options options indicating how symbolic links are handled.
-     * @return a new instance. 
+     * @return a new instance.
      * @throws IOException if an I/O error occurs.
      * @since 1.21
      */
diff --git a/src/main/java/org/apache/commons/compress/compressors/deflate64/HuffmanDecoder.java b/src/main/java/org/apache/commons/compress/compressors/deflate64/HuffmanDecoder.java
index 792d560..b2956cb 100644
--- a/src/main/java/org/apache/commons/compress/compressors/deflate64/HuffmanDecoder.java
+++ b/src/main/java/org/apache/commons/compress/compressors/deflate64/HuffmanDecoder.java
@@ -29,7 +29,7 @@ import java.util.Arrays;
 import static org.apache.commons.compress.compressors.deflate64.HuffmanState.*;
 
 class HuffmanDecoder implements Closeable {
-    
+
     /**
      * <pre>
      * --------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/compressors/lz77support/LZ77Compressor.java b/src/main/java/org/apache/commons/compress/compressors/lz77support/LZ77Compressor.java
index 33735f9..f8f9abc 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lz77support/LZ77Compressor.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lz77support/LZ77Compressor.java
@@ -258,7 +258,7 @@ public class LZ77Compressor {
     public LZ77Compressor(final Parameters params, final Callback callback) {
         Objects.requireNonNull(params, "params");
         Objects.requireNonNull(callback, "callback");
-        
+
         this.params = params;
         this.callback = callback;
 
diff --git a/src/main/java/org/apache/commons/compress/utils/IOUtils.java b/src/main/java/org/apache/commons/compress/utils/IOUtils.java
index 8e79e01..54636c1 100644
--- a/src/main/java/org/apache/commons/compress/utils/IOUtils.java
+++ b/src/main/java/org/apache/commons/compress/utils/IOUtils.java
@@ -40,7 +40,7 @@ public final class IOUtils {
 
     private static final int COPY_BUF_SIZE = 8024;
     private static final int SKIP_BUF_SIZE = 4096;
-    
+
     /**
      * Empty array of of type {@link LinkOption}.
      *
diff --git a/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java b/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
index 12b2212..aa2441e 100644
--- a/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
+++ b/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
@@ -62,7 +62,7 @@ import org.junit.Assert;
 import org.junit.Test;
 
 public final class ZipTestCase extends AbstractTestCase {
-    
+
     /**
      * Archives 2 files and unarchives it again. If the file length of result
      * and source is the same, it looks like the operations have worked
diff --git a/src/test/java/org/apache/commons/compress/compressors/zstandard/ZstdCompressorInputStreamTest.java b/src/test/java/org/apache/commons/compress/compressors/zstandard/ZstdCompressorInputStreamTest.java
index 83dedfc..ccc9c18 100644
--- a/src/test/java/org/apache/commons/compress/compressors/zstandard/ZstdCompressorInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/zstandard/ZstdCompressorInputStreamTest.java
@@ -38,8 +38,8 @@ public class ZstdCompressorInputStreamTest extends AbstractTestCase {
 
     /**
      * Test bridge works fine.
-     * 
-     * @throws IOException 
+     *
+     * @throws IOException
      */
     @Test
     public void testZstdDecode() throws IOException {


[commons-compress] 01/03: Use final.

Posted by gg...@apache.org.
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 f3afb6e6e6e32ac47a1760e52e639310eb7bc688
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Aug 8 18:08:53 2020 -0400

    Use final.
---
 .../commons/compress/MemoryLimitException.java     |   6 +-
 .../compress/archivers/ArchiveOutputStream.java    |   2 +-
 .../compress/archivers/ArchiveStreamFactory.java   |  22 +--
 .../apache/commons/compress/archivers/Lister.java  |  14 +-
 .../compress/archivers/ar/ArArchiveEntry.java      |   2 +-
 .../archivers/ar/ArArchiveInputStream.java         |  12 +-
 .../archivers/ar/ArArchiveOutputStream.java        |   2 +-
 .../compress/archivers/arj/ArjArchiveEntry.java    |   2 +-
 .../compress/archivers/arj/LocalFileHeader.java    |   2 +-
 .../compress/archivers/cpio/CpioArchiveEntry.java  |   8 +-
 .../archivers/cpio/CpioArchiveOutputStream.java    |  10 +-
 .../compress/archivers/dump/TapeInputStream.java   |   6 +-
 .../archivers/examples/CloseableConsumer.java      |   4 +-
 .../examples/CloseableConsumerAdapter.java         |   4 +-
 .../compress/archivers/examples/Expander.java      |  38 ++---
 .../archivers/sevenz/AES256SHA256Decoder.java      |   2 +-
 .../BoundedSeekableByteChannelInputStream.java     |   6 +-
 .../commons/compress/archivers/sevenz/Coders.java  |  20 +--
 .../compress/archivers/sevenz/DeltaDecoder.java    |   2 +-
 .../compress/archivers/sevenz/LZMA2Decoder.java    |   2 +-
 .../compress/archivers/sevenz/LZMADecoder.java     |  14 +-
 .../archivers/sevenz/SevenZArchiveEntry.java       |  10 +-
 .../compress/archivers/sevenz/SevenZFile.java      |  72 +++++-----
 .../archivers/sevenz/SevenZFileOptions.java        |   6 +-
 .../sevenz/SevenZMethodConfiguration.java          |   2 +-
 .../archivers/sevenz/SevenZOutputFile.java         |   6 +-
 .../compress/archivers/tar/TarArchiveEntry.java    |  36 ++---
 .../archivers/tar/TarArchiveInputStream.java       |  44 +++---
 .../archivers/tar/TarArchiveOutputStream.java      |   6 +-
 .../archivers/tar/TarArchiveSparseEntry.java       |   4 +-
 .../archivers/tar/TarArchiveStructSparse.java      |   6 +-
 .../commons/compress/archivers/tar/TarUtils.java   |   4 +-
 .../archivers/zip/ExplodingInputStream.java        |   2 +-
 .../compress/archivers/zip/ExtraFieldUtils.java    |  18 +--
 .../zip/InflaterInputStreamWithStatistics.java     |   8 +-
 .../compress/archivers/zip/NioZipEncoding.java     |  24 ++--
 .../archivers/zip/ParallelScatterZipCreator.java   |   8 +-
 .../archivers/zip/ResourceAlignmentExtraField.java |  14 +-
 .../archivers/zip/ScatterZipOutputStream.java      |   6 +-
 .../archivers/zip/X5455_ExtendedTimestamp.java     |   4 +-
 .../compress/archivers/zip/X7875_NewUnix.java      |   4 +-
 .../compress/archivers/zip/ZipArchiveEntry.java    |  58 ++++----
 .../archivers/zip/ZipArchiveInputStream.java       |  22 +--
 .../archivers/zip/ZipArchiveOutputStream.java      |  44 +++---
 .../compress/archivers/zip/ZipEncodingHelper.java  |   6 +-
 .../commons/compress/archivers/zip/ZipFile.java    |  32 ++---
 .../commons/compress/archivers/zip/ZipLong.java    |   4 +-
 .../archivers/zip/ZipSplitOutputStream.java        |  24 ++--
 .../zip/ZipSplitReadOnlySeekableByteChannel.java   |  54 +++----
 .../compressors/CompressorStreamFactory.java       |   4 +-
 .../bzip2/BZip2CompressorInputStream.java          |  18 +--
 .../deflate64/Deflate64CompressorInputStream.java  |  10 +-
 .../compressors/deflate64/HuffmanDecoder.java      | 108 +++++++-------
 .../lz4/BlockLZ4CompressorInputStream.java         |  10 +-
 .../lz4/BlockLZ4CompressorOutputStream.java        | 114 +++++++--------
 .../lz4/FramedLZ4CompressorInputStream.java        |  56 ++++----
 .../lz4/FramedLZ4CompressorOutputStream.java       |  36 ++---
 .../commons/compress/compressors/lz4/XXHash32.java |  10 +-
 .../AbstractLZ77CompressorInputStream.java         |  16 +--
 .../compressors/lz77support/LZ77Compressor.java    |  34 ++---
 .../compressors/lz77support/Parameters.java        |  36 ++---
 .../lzma/LZMACompressorInputStream.java            |   4 +-
 .../compress/compressors/lzw/LZWInputStream.java   |   4 +-
 .../snappy/FramedSnappyCompressorOutputStream.java |  12 +-
 .../snappy/SnappyCompressorInputStream.java        |  10 +-
 .../snappy/SnappyCompressorOutputStream.java       |  38 ++---
 .../compressors/xz/XZCompressorInputStream.java    |  10 +-
 .../zstandard/ZstdCompressorOutputStream.java      |   8 +-
 .../FileBasedScatterGatherBackingStore.java        |   4 +-
 .../commons/compress/utils/BitInputStream.java     |  10 +-
 .../commons/compress/utils/BoundedInputStream.java |   4 +-
 .../apache/commons/compress/utils/ByteUtils.java   |  30 ++--
 .../utils/CloseShieldFilterInputStream.java        |   2 +-
 .../commons/compress/utils/FileNameUtils.java      |  12 +-
 .../utils/FixedLengthBlockOutputStream.java        |  42 +++---
 .../utils/FlushShieldFilterOutputStream.java       |   2 +-
 .../org/apache/commons/compress/utils/IOUtils.java |   6 +-
 .../utils/MultiReadOnlySeekableByteChannel.java    |  30 ++--
 .../utils/SeekableInMemoryByteChannel.java         |  20 +--
 .../org/apache/commons/compress/utils/Sets.java    |   2 +-
 .../compress/utils/SkipShieldingInputStream.java   |   4 +-
 .../apache/commons/compress/ArchiveReadTest.java   |   2 +-
 .../apache/commons/compress/ArchiveUtilsTest.java  |  10 +-
 .../commons/compress/MockEvilInputStream.java      |   2 +-
 .../archivers/ArchiveOutputStreamTest.java         |   4 +-
 .../archivers/ArchiveStreamFactoryTest.java        |  10 +-
 .../commons/compress/archivers/LongPathTest.java   |   2 +-
 .../compress/archivers/LongSymLinkTest.java        |   2 +-
 .../commons/compress/archivers/SevenZTestCase.java |   4 +-
 .../commons/compress/archivers/ZipTestCase.java    |  68 ++++-----
 .../archivers/ar/ArArchiveInputStreamTest.java     |  10 +-
 .../archivers/arj/ArjArchiveInputStreamTest.java   |   6 +-
 .../compress/archivers/arj/CoverageTest.java       |   4 +-
 .../archivers/cpio/CpioArchiveInputStreamTest.java |   6 +-
 .../compress/archivers/cpio/CpioArchiveTest.java   |   6 +-
 .../compress/archivers/cpio/CpioUtilTest.java      |   2 +-
 .../archivers/dump/DumpArchiveInputStreamTest.java |   6 +-
 .../compress/archivers/examples/ExpanderTest.java  |  18 +--
 .../examples/ParameterizedArchiverTest.java        |  14 +-
 .../examples/ParameterizedExpanderTest.java        |  10 +-
 .../archivers/examples/SevenZArchiverTest.java     |  12 +-
 .../compress/archivers/jar/JarMarkerTest.java      |   4 +-
 .../archivers/sevenz/AES256SHA256DecoderTest.java  |  12 +-
 .../compress/archivers/sevenz/CoverageTest.java    |   4 +-
 .../compress/archivers/sevenz/FolderTest.java      |  20 +--
 .../archivers/sevenz/SevenZArchiveEntryTest.java   |  22 +--
 .../compress/archivers/sevenz/SevenZFileTest.java  |  48 +++----
 .../archivers/sevenz/SevenZNativeHeapTest.java     |  34 ++---
 .../compress/archivers/tar/SparseFilesTest.java    |  14 +-
 .../archivers/tar/TarArchiveEntryTest.java         |  16 +--
 .../archivers/tar/TarArchiveInputStreamTest.java   |  30 ++--
 .../archivers/tar/TarArchiveOutputStreamTest.java  |  44 +++---
 .../archivers/tar/TarMemoryFileSystemTest.java     |   6 +-
 .../compress/archivers/tar/TarUtilsTest.java       |   4 +-
 .../compress/archivers/zip/BinaryTreeTest.java     |   8 +-
 .../compress/archivers/zip/DataDescriptorTest.java |  90 ++++++------
 .../compress/archivers/zip/ExplodeSupportTest.java |   8 +-
 .../archivers/zip/ExtraFieldUtilsTest.java         |   8 +-
 .../archivers/zip/Maven221MultiVolumeTest.java     |   2 +-
 .../compress/archivers/zip/NioZipEncodingTest.java |  42 +++---
 .../zip/ParallelScatterZipCreatorTest.java         |  18 +--
 .../archivers/zip/PkWareExtraHeaderTest.java       |  12 +-
 .../archivers/zip/StreamCompressorTest.java        |   2 +-
 .../archivers/zip/X5455_ExtendedTimestampTest.java |   2 +-
 .../compress/archivers/zip/Zip64SupportIT.java     |   4 +-
 .../archivers/zip/ZipArchiveEntryTest.java         |  40 +++---
 .../archivers/zip/ZipArchiveInputStreamTest.java   |  92 ++++++------
 .../archivers/zip/ZipClassCoverageTest.java        |  12 +-
 .../compress/archivers/zip/ZipEncodingTest.java    |   8 +-
 .../zip/ZipFileIgnoringLocalFileHeaderTest.java    |  12 +-
 .../compress/archivers/zip/ZipFileTest.java        | 158 ++++++++++-----------
 .../archivers/zip/ZipSplitOutputStreamTest.java    |  22 +--
 .../compress/archivers/zip/ZipUtilTest.java        |   4 +-
 .../commons/compress/changes/ChangeTest.java       |  10 +-
 .../compressors/DetectCompressorTestCase.java      |  14 +-
 .../compress/compressors/FramedSnappyTestCase.java |  20 +--
 .../commons/compress/compressors/GZipTestCase.java |   2 +-
 .../commons/compress/compressors/LZMATestCase.java |   2 +-
 .../compress/compressors/Pack200TestCase.java      |   6 +-
 .../brotli/BrotliCompressorInputStreamTest.java    |   2 +-
 .../bzip2/BZip2CompressorInputStreamTest.java      |   4 +-
 .../deflate/DeflateCompressorInputStreamTest.java  |   2 +-
 .../compressors/deflate64/Deflate64BugsTest.java   |   8 +-
 .../Deflate64CompressorInputStreamTest.java        |  22 +--
 .../compressors/deflate64/HuffmanDecoderTest.java  |  52 +++----
 .../lz4/BlockLZ4CompressorInputStreamTest.java     |   6 +-
 .../lz4/BlockLZ4CompressorOutputStreamTest.java    | 110 +++++++-------
 .../lz4/BlockLZ4CompressorRoundtripTest.java       |  10 +-
 .../compress/compressors/lz4/FactoryTest.java      |   8 +-
 .../lz4/FramedLZ4CompressorInputStreamTest.java    | 132 ++++++++---------
 .../lz4/FramedLZ4CompressorRoundtripTest.java      |  10 +-
 .../compress/compressors/lz4/XXHash32Test.java     |   6 +-
 .../AbstractLZ77CompressorInputStreamTest.java     |  14 +-
 .../lz77support/LZ77CompressorTest.java            |  74 +++++-----
 .../compressors/lz77support/ParametersTest.java    |  30 ++--
 .../FramedSnappyCompressorInputStreamTest.java     |   8 +-
 .../compressors/snappy/SnappyRoundtripTest.java    |  34 ++---
 .../xz/XZCompressorInputStreamTest.java            |   6 +-
 .../xz/XZCompressorOutputStreamTest.java           |   2 +-
 .../compressors/z/ZCompressorInputStreamTest.java  |   6 +-
 .../zstandard/ZstdCompressorInputStreamTest.java   |   4 +-
 .../compressors/zstandard/ZstdRoundtripTest.java   |  22 +--
 .../commons/compress/utils/BitInputStreamTest.java |   4 +-
 .../commons/compress/utils/ByteUtilsTest.java      |  48 +++----
 .../utils/ChecksumCalculatingInputStreamTest.java  |  50 +++----
 .../utils/ChecksumVerifyingInputStreamTest.java    |  28 ++--
 .../utils/FixedLengthBlockOutputStreamTest.java    | 146 +++++++++----------
 .../apache/commons/compress/utils/IOUtilsTest.java |   8 +-
 .../MultiReadOnlySeekableByteChannelTest.java      |  44 +++---
 .../utils/SeekableInMemoryByteChannelTest.java     |  70 ++++-----
 .../compress/utils/ServiceLoaderIteratorTest.java  |  14 +-
 .../ZipSplitReadOnlySeekableByteChannelTest.java   |  62 ++++----
 172 files changed, 1757 insertions(+), 1757 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/MemoryLimitException.java b/src/main/java/org/apache/commons/compress/MemoryLimitException.java
index d251fb3..49e17f0 100644
--- a/src/main/java/org/apache/commons/compress/MemoryLimitException.java
+++ b/src/main/java/org/apache/commons/compress/MemoryLimitException.java
@@ -36,13 +36,13 @@ public class MemoryLimitException extends IOException {
     private final long memoryNeededInKb;
     private final int memoryLimitInKb;
 
-    public MemoryLimitException(long memoryNeededInKb, int memoryLimitInKb) {
+    public MemoryLimitException(final long memoryNeededInKb, final int memoryLimitInKb) {
         super(buildMessage(memoryNeededInKb, memoryLimitInKb));
         this.memoryNeededInKb = memoryNeededInKb;
         this.memoryLimitInKb = memoryLimitInKb;
     }
 
-    public MemoryLimitException(long memoryNeededInKb, int memoryLimitInKb, Exception e) {
+    public MemoryLimitException(final long memoryNeededInKb, final int memoryLimitInKb, final Exception e) {
         super(buildMessage(memoryNeededInKb, memoryLimitInKb), e);
         this.memoryNeededInKb = memoryNeededInKb;
         this.memoryLimitInKb = memoryLimitInKb;
@@ -56,7 +56,7 @@ public class MemoryLimitException extends IOException {
         return memoryLimitInKb;
     }
 
-    private static String buildMessage(long memoryNeededInKb, int memoryLimitInKb) {
+    private static String buildMessage(final long memoryNeededInKb, final int memoryLimitInKb) {
         return memoryNeededInKb + " kb of memory would be needed; limit was "
                 + memoryLimitInKb + " kb. " +
                 "If the file is not corrupt, consider increasing the memory limit.";
diff --git a/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java
index c7c4a52..deadde5 100644
--- a/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java
@@ -108,7 +108,7 @@ public abstract class ArchiveOutputStream extends OutputStream {
      * @throws IOException if an I/O error occurs
      * @since 1.21
      */
-    public ArchiveEntry createArchiveEntry(Path inputPath, String entryName, LinkOption... options) throws IOException {
+    public ArchiveEntry createArchiveEntry(final Path inputPath, final String entryName, final LinkOption... options) throws IOException {
         return createArchiveEntry(inputPath.toFile(), entryName);
     }
 
diff --git a/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java b/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java
index 84283c7..b6cbae8 100644
--- a/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java
+++ b/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java
@@ -168,9 +168,9 @@ public class ArchiveStreamFactory implements ArchiveStreamProvider {
         return Lists.newArrayList(serviceLoaderIterator());
     }
 
-    static void putAll(Set<String> names, ArchiveStreamProvider provider,
-            TreeMap<String, ArchiveStreamProvider> map) {
-        for (String name : names) {
+    static void putAll(final Set<String> names, final ArchiveStreamProvider provider,
+            final TreeMap<String, ArchiveStreamProvider> map) {
+        for (final String name : names) {
             map.put(toKey(name), provider);
         }
     }
@@ -214,9 +214,9 @@ public class ArchiveStreamFactory implements ArchiveStreamProvider {
         return AccessController.doPrivileged(new PrivilegedAction<SortedMap<String, ArchiveStreamProvider>>() {
             @Override
             public SortedMap<String, ArchiveStreamProvider> run() {
-                TreeMap<String, ArchiveStreamProvider> map = new TreeMap<>();
+                final TreeMap<String, ArchiveStreamProvider> map = new TreeMap<>();
                 putAll(DEFAULT.getInputStreamArchiveNames(), DEFAULT, map);
-                for (ArchiveStreamProvider provider : findArchiveStreamProviders()) {
+                for (final ArchiveStreamProvider provider : findArchiveStreamProviders()) {
                     putAll(provider.getInputStreamArchiveNames(), provider, map);
                 }
                 return map;
@@ -255,9 +255,9 @@ public class ArchiveStreamFactory implements ArchiveStreamProvider {
         return AccessController.doPrivileged(new PrivilegedAction<SortedMap<String, ArchiveStreamProvider>>() {
             @Override
             public SortedMap<String, ArchiveStreamProvider> run() {
-                TreeMap<String, ArchiveStreamProvider> map = new TreeMap<>();
+                final TreeMap<String, ArchiveStreamProvider> map = new TreeMap<>();
                 putAll(DEFAULT.getOutputStreamArchiveNames(), DEFAULT, map);
-                for (ArchiveStreamProvider provider : findArchiveStreamProviders()) {
+                for (final ArchiveStreamProvider provider : findArchiveStreamProviders()) {
                     putAll(provider.getOutputStreamArchiveNames(), provider, map);
                 }
                 return map;
@@ -487,7 +487,7 @@ public class ArchiveStreamFactory implements ArchiveStreamProvider {
      * @throws ArchiveException if an archiver cannot be detected in the stream
      * @since 1.14
      */
-    public static String detect(InputStream in) throws ArchiveException {
+    public static String detect(final InputStream in) throws ArchiveException {
         if (in == null) {
             throw new IllegalArgumentException("Stream must not be null.");
         }
@@ -502,7 +502,7 @@ public class ArchiveStreamFactory implements ArchiveStreamProvider {
         try {
             signatureLength = IOUtils.readFully(in, signature);
             in.reset();
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new ArchiveException("IOException while reading signature.", e);
         }
 
@@ -526,7 +526,7 @@ public class ArchiveStreamFactory implements ArchiveStreamProvider {
         try {
             signatureLength = IOUtils.readFully(in, dumpsig);
             in.reset();
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new ArchiveException("IOException while reading dump signature", e);
         }
         if (DumpArchiveInputStream.matches(dumpsig, signatureLength)) {
@@ -539,7 +539,7 @@ public class ArchiveStreamFactory implements ArchiveStreamProvider {
         try {
             signatureLength = IOUtils.readFully(in, tarHeader);
             in.reset();
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new ArchiveException("IOException while reading tar signature", e);
         }
         if (TarArchiveInputStream.matches(tarHeader, signatureLength)) {
diff --git a/src/main/java/org/apache/commons/compress/archivers/Lister.java b/src/main/java/org/apache/commons/compress/archivers/Lister.java
index 330d089..5f5705c 100644
--- a/src/main/java/org/apache/commons/compress/archivers/Lister.java
+++ b/src/main/java/org/apache/commons/compress/archivers/Lister.java
@@ -50,7 +50,7 @@ public final class Lister {
         if (!f.isFile()) {
             System.err.println(f + " doesn't exist or is a directory");
         }
-        String format = args.length > 1 ? args[1] : detectFormat(f);
+        final String format = args.length > 1 ? args[1] : detectFormat(f);
         if (ArchiveStreamFactory.SEVEN_Z.equalsIgnoreCase(format)) {
             list7z(f);
         } else if ("zipfile".equals(format)) {
@@ -60,7 +60,7 @@ public final class Lister {
         }
     }
 
-    private static void listStream(File f, String[] args) throws ArchiveException, IOException {
+    private static void listStream(final File f, final String[] args) throws ArchiveException, IOException {
         try (final InputStream fis = new BufferedInputStream(Files.newInputStream(f.toPath()));
                 final ArchiveInputStream ais = createArchiveInputStream(args, fis)) {
             System.out.println("Created " + ais.toString());
@@ -79,28 +79,28 @@ public final class Lister {
         return FACTORY.createArchiveInputStream(fis);
     }
 
-    private static String detectFormat(File f) throws ArchiveException, IOException {
+    private static String detectFormat(final File f) throws ArchiveException, IOException {
         try (final InputStream fis = new BufferedInputStream(Files.newInputStream(f.toPath()))) {
             return FACTORY.detect(fis);
         }
     }
 
-    private static void list7z(File f) throws ArchiveException, IOException {
+    private static void list7z(final File f) throws ArchiveException, IOException {
         try (SevenZFile z = new SevenZFile(f)) {
             System.out.println("Created " + z.toString());
             ArchiveEntry ae;
             while ((ae = z.getNextEntry()) != null) {
-                String name = ae.getName() == null ? z.getDefaultName() + " (entry name was null)"
+                final String name = ae.getName() == null ? z.getDefaultName() + " (entry name was null)"
                     : ae.getName();
                 System.out.println(name);
             }
         }
     }
 
-    private static void listZipUsingZipFile(File f) throws ArchiveException, IOException {
+    private static void listZipUsingZipFile(final File f) throws ArchiveException, IOException {
         try (ZipFile z = new ZipFile(f)) {
             System.out.println("Created " + z.toString());
-            for (Enumeration<ZipArchiveEntry> en = z.getEntries(); en.hasMoreElements(); ) {
+            for (final Enumeration<ZipArchiveEntry> en = z.getEntries(); en.hasMoreElements(); ) {
                 System.out.println(en.nextElement().getName());
             }
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java
index 863a2de..b590292 100644
--- a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java
@@ -129,7 +129,7 @@ public class ArArchiveEntry implements ArchiveEntry {
      * @throws IOException if an I/O error occurs.
      * @since 1.21
      */
-    public ArArchiveEntry(Path inputPath, String entryName, LinkOption... options) throws IOException {
+    public ArArchiveEntry(final Path inputPath, final String entryName, final LinkOption... options) throws IOException {
         this(entryName, Files.isRegularFile(inputPath, options) ? Files.size(inputPath) : 0, 0, 0, DEFAULT_MODE,
             Files.getLastModifiedTime(inputPath, options).toMillis() / 1000);
     }
diff --git a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
index ca45d9e..71451c7 100644
--- a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
@@ -94,7 +94,7 @@ public class ArArchiveInputStream extends ArchiveInputStream {
     public ArArchiveEntry getNextArEntry() throws IOException {
         if (currentEntry != null) {
             final long entryEnd = entryOffset + currentEntry.getLength();
-            long skipped = IOUtils.skip(input, entryEnd - offset);
+            final long skipped = IOUtils.skip(input, entryEnd - offset);
             trackReadBytes(skipped);
             currentEntry = null;
         }
@@ -201,23 +201,23 @@ public class ArArchiveInputStream extends ArchiveInputStream {
         throw new IOException("Failed to read entry: " + offset);
     }
 
-    private long asLong(final byte[] byteArray, int offset, int len) {
+    private long asLong(final byte[] byteArray, final int offset, final int len) {
         return Long.parseLong(ArchiveUtils.toAsciiString(byteArray, offset, len).trim());
     }
 
-    private int asInt(final byte[] byteArray, int offset, int len) {
+    private int asInt(final byte[] byteArray, final int offset, final int len) {
         return asInt(byteArray, offset, len, 10, false);
     }
 
-    private int asInt(final byte[] byteArray, int offset, int len, final boolean treatBlankAsZero) {
+    private int asInt(final byte[] byteArray, final int offset, final int len, final boolean treatBlankAsZero) {
         return asInt(byteArray, offset, len, 10, treatBlankAsZero);
     }
 
-    private int asInt(final byte[] byteArray, int offset, int len, final int base) {
+    private int asInt(final byte[] byteArray, final int offset, final int len, final int base) {
         return asInt(byteArray, offset, len, base, false);
     }
 
-    private int asInt(final byte[] byteArray, int offset, int len, final int base, final boolean treatBlankAsZero) {
+    private int asInt(final byte[] byteArray, final int offset, final int len, final int base, final boolean treatBlankAsZero) {
         final String string = ArchiveUtils.toAsciiString(byteArray, offset, len).trim();
         if (string.length() == 0 && treatBlankAsZero) {
             return 0;
diff --git a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java
index 5ef781f..d2ace3b 100644
--- a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java
@@ -234,7 +234,7 @@ public class ArArchiveOutputStream extends ArchiveOutputStream {
      * @since 1.21
      */
     @Override
-    public ArchiveEntry createArchiveEntry(Path inputPath, String entryName, LinkOption... options) throws IOException {
+    public ArchiveEntry createArchiveEntry(final Path inputPath, final String entryName, final LinkOption... options) throws IOException {
         if (finished) {
             throw new IOException("Stream has already been finished");
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java
index 947a751..c384216 100644
--- a/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java
@@ -150,7 +150,7 @@ public class ArjArchiveEntry implements ArchiveEntry {
     }
 
     @Override
-    public boolean equals(Object obj) {
+    public boolean equals(final Object obj) {
         if (this == obj) {
             return true;
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/arj/LocalFileHeader.java b/src/main/java/org/apache/commons/compress/archivers/arj/LocalFileHeader.java
index da95871..b77a8a5 100644
--- a/src/main/java/org/apache/commons/compress/archivers/arj/LocalFileHeader.java
+++ b/src/main/java/org/apache/commons/compress/archivers/arj/LocalFileHeader.java
@@ -131,7 +131,7 @@ class LocalFileHeader {
     }
 
     @Override
-    public boolean equals(Object obj) {
+    public boolean equals(final Object obj) {
         if (this == obj) {
             return true;
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java
index 27db939..11a52e1 100644
--- a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java
@@ -333,7 +333,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry {
      * @throws IOException if an I/O error occurs
      * @since 1.21
      */
-    public CpioArchiveEntry(final Path inputPath, final String entryName, LinkOption... options) throws IOException {
+    public CpioArchiveEntry(final Path inputPath, final String entryName, final LinkOption... options) throws IOException {
         this(FORMAT_NEW, inputPath, entryName, options);
     }
 
@@ -396,7 +396,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry {
      * @throws IOException if an I/O error occurs
      * @since 1.21
      */
-    public CpioArchiveEntry(final short format, final Path inputPath, final String entryName, LinkOption... options)
+    public CpioArchiveEntry(final short format, final Path inputPath, final String entryName, final LinkOption... options)
         throws IOException {
         this(format, entryName, Files.isRegularFile(inputPath, options) ? Files.size(inputPath) : 0);
         if (Files.isDirectory(inputPath, options)) {
@@ -545,7 +545,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry {
      * @return the number of bytes needed to pad the header (0,1,2,3)
      * @since 1.18
      */
-    public int getHeaderPadCount(Charset charset) {
+    public int getHeaderPadCount(final Charset charset) {
         if (name == null) {
             return 0;
         }
@@ -565,7 +565,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry {
      *
      * @since 1.18
      */
-    public int getHeaderPadCount(long namesize) {
+    public int getHeaderPadCount(final long namesize) {
         if (this.alignmentBoundary == 0) { return 0; }
         int size = this.headerSize + 1;  // Name has terminating null
         if (name != null) {
diff --git a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java
index 09d56e7..cf8870f 100644
--- a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java
@@ -302,7 +302,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements
         writeAsciiLong(devMin, 8, 16);
         writeAsciiLong(entry.getRemoteDeviceMaj(), 8, 16);
         writeAsciiLong(entry.getRemoteDeviceMin(), 8, 16);
-        byte[] name = encode(entry.getName());
+        final byte[] name = encode(entry.getName());
         writeAsciiLong(name.length + 1L, 8, 16);
         writeAsciiLong(entry.getChksum(), 8, 16);
         writeCString(name);
@@ -334,7 +334,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements
         writeAsciiLong(entry.getNumberOfLinks(), 6, 8);
         writeAsciiLong(entry.getRemoteDevice(), 6, 8);
         writeAsciiLong(entry.getTime(), 11, 8);
-        byte[] name = encode(entry.getName());
+        final byte[] name = encode(entry.getName());
         writeAsciiLong(name.length + 1L, 6, 8);
         writeAsciiLong(entry.getSize(), 11, 8);
         writeCString(name);
@@ -365,7 +365,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements
         writeBinaryLong(entry.getNumberOfLinks(), 2, swapHalfWord);
         writeBinaryLong(entry.getRemoteDevice(), 2, swapHalfWord);
         writeBinaryLong(entry.getTime(), 4, swapHalfWord);
-        byte[] name = encode(entry.getName());
+        final byte[] name = encode(entry.getName());
         writeBinaryLong(name.length + 1L, 2, swapHalfWord);
         writeBinaryLong(entry.getSize(), 4, swapHalfWord);
         writeCString(name);
@@ -559,7 +559,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements
      * @param str the String to write
      * @throws IOException if the string couldn't be written
      */
-    private void writeCString(byte[] str) throws IOException {
+    private void writeCString(final byte[] str) throws IOException {
         out.write(str);
         out.write('\0');
         count(str.length + 1);
@@ -585,7 +585,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements
      * @see org.apache.commons.compress.archivers.ArchiveOutputStream#createArchiveEntry(java.io.File, java.lang.String)
      */
     @Override
-    public ArchiveEntry createArchiveEntry(final Path inputPath, final String entryName, LinkOption... options)
+    public ArchiveEntry createArchiveEntry(final Path inputPath, final String entryName, final LinkOption... options)
             throws IOException {
         if(finished) {
             throw new IOException("Stream has already been finished");
diff --git a/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java b/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java
index 4ca1b86..dee53dd 100644
--- a/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java
@@ -138,7 +138,7 @@ class TapeInputStream extends FilterInputStream {
             if (readOffset == blockSize) {
                 try {
                     readBlock(true);
-                } catch (ShortFileException sfe) { // NOSONAR
+                } catch (final ShortFileException sfe) { // NOSONAR
                     return -1;
                 }
             }
@@ -189,7 +189,7 @@ class TapeInputStream extends FilterInputStream {
             if (readOffset == blockSize) {
                 try {
                     readBlock((len - bytes) < blockSize);
-                } catch (ShortFileException sfe) { // NOSONAR
+                } catch (final ShortFileException sfe) { // NOSONAR
                     return -1;
                 }
             }
@@ -237,7 +237,7 @@ class TapeInputStream extends FilterInputStream {
         if (readOffset == blockSize) {
             try {
                 readBlock(true);
-            } catch (ShortFileException sfe) { // NOSONAR
+            } catch (final ShortFileException sfe) { // NOSONAR
                 return null;
             }
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumer.java b/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumer.java
index dead47f..39180fb 100644
--- a/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumer.java
+++ b/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumer.java
@@ -36,7 +36,7 @@ public interface CloseableConsumer {
      */
     public static CloseableConsumer CLOSING_CONSUMER = new CloseableConsumer() {
         @Override
-        public void accept(Closeable c) throws IOException {
+        public void accept(final Closeable c) throws IOException {
             c.close();
         }
     };
@@ -46,7 +46,7 @@ public interface CloseableConsumer {
      */
     public static CloseableConsumer NULL_CONSUMER = new CloseableConsumer() {
         @Override
-        public void accept(Closeable c) { }
+        public void accept(final Closeable c) { }
     };
 
     /**
diff --git a/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumerAdapter.java b/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumerAdapter.java
index a869420..832410e 100644
--- a/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumerAdapter.java
+++ b/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumerAdapter.java
@@ -26,11 +26,11 @@ final class CloseableConsumerAdapter implements Closeable {
     private final CloseableConsumer consumer;
     private Closeable closeable;
 
-    CloseableConsumerAdapter(CloseableConsumer consumer) {
+    CloseableConsumerAdapter(final CloseableConsumer consumer) {
         this.consumer = Objects.requireNonNull(consumer, "consumer");
     }
 
-    <C extends Closeable> C track(C closeable) {
+    <C extends Closeable> C track(final C closeable) {
         this.closeable = closeable;
         return closeable;
     }
diff --git a/src/main/java/org/apache/commons/compress/archivers/examples/Expander.java b/src/main/java/org/apache/commons/compress/archivers/examples/Expander.java
index 5d07533..3edfa5f 100644
--- a/src/main/java/org/apache/commons/compress/archivers/examples/Expander.java
+++ b/src/main/java/org/apache/commons/compress/archivers/examples/Expander.java
@@ -63,7 +63,7 @@ public class Expander {
      * @throws IOException if an I/O error occurs
      * @throws ArchiveException if the archive cannot be read for other reasons
      */
-    public void expand(File archive, File targetDirectory) throws IOException, ArchiveException {
+    public void expand(final File archive, final File targetDirectory) throws IOException, ArchiveException {
         String format = null;
         try (InputStream i = new BufferedInputStream(Files.newInputStream(archive.toPath()))) {
             format = ArchiveStreamFactory.DEFAULT.detect(i);
@@ -81,7 +81,7 @@ public class Expander {
      * @throws IOException if an I/O error occurs
      * @throws ArchiveException if the archive cannot be read for other reasons
      */
-    public void expand(String format, File archive, File targetDirectory) throws IOException, ArchiveException {
+    public void expand(final String format, final File archive, final File targetDirectory) throws IOException, ArchiveException {
         if (prefersSeekableByteChannel(format)) {
             try (SeekableByteChannel c = FileChannel.open(archive.toPath(), StandardOpenOption.READ)) {
                 expand(format, c, targetDirectory, CloseableConsumer.CLOSING_CONSUMER);
@@ -110,7 +110,7 @@ public class Expander {
      * @deprecated this method leaks resources
      */
     @Deprecated
-    public void expand(InputStream archive, File targetDirectory) throws IOException, ArchiveException {
+    public void expand(final InputStream archive, final File targetDirectory) throws IOException, ArchiveException {
         expand(archive, targetDirectory, CloseableConsumer.NULL_CONSUMER);
     }
 
@@ -133,7 +133,7 @@ public class Expander {
      * @throws ArchiveException if the archive cannot be read for other reasons
      * @since 1.19
      */
-    public void expand(InputStream archive, File targetDirectory, CloseableConsumer closeableConsumer)
+    public void expand(final InputStream archive, final File targetDirectory, final CloseableConsumer closeableConsumer)
         throws IOException, ArchiveException {
         try (CloseableConsumerAdapter c = new CloseableConsumerAdapter(closeableConsumer)) {
             expand(c.track(ArchiveStreamFactory.DEFAULT.createArchiveInputStream(archive)),
@@ -158,7 +158,7 @@ public class Expander {
      * @deprecated this method leaks resources
      */
     @Deprecated
-    public void expand(String format, InputStream archive, File targetDirectory)
+    public void expand(final String format, final InputStream archive, final File targetDirectory)
         throws IOException, ArchiveException {
         expand(format, archive, targetDirectory, CloseableConsumer.NULL_CONSUMER);
     }
@@ -182,7 +182,7 @@ public class Expander {
      * @throws ArchiveException if the archive cannot be read for other reasons
      * @since 1.19
      */
-    public void expand(String format, InputStream archive, File targetDirectory, CloseableConsumer closeableConsumer)
+    public void expand(final String format, final InputStream archive, final File targetDirectory, final CloseableConsumer closeableConsumer)
         throws IOException, ArchiveException {
         try (CloseableConsumerAdapter c = new CloseableConsumerAdapter(closeableConsumer)) {
             expand(c.track(ArchiveStreamFactory.DEFAULT.createArchiveInputStream(format, archive)),
@@ -207,7 +207,7 @@ public class Expander {
      * @deprecated this method leaks resources
      */
     @Deprecated
-    public void expand(String format, SeekableByteChannel archive, File targetDirectory)
+    public void expand(final String format, final SeekableByteChannel archive, final File targetDirectory)
         throws IOException, ArchiveException {
         expand(format, archive, targetDirectory, CloseableConsumer.NULL_CONSUMER);
     }
@@ -231,8 +231,8 @@ public class Expander {
      * @throws ArchiveException if the archive cannot be read for other reasons
      * @since 1.19
      */
-    public void expand(String format, SeekableByteChannel archive, File targetDirectory,
-        CloseableConsumer closeableConsumer)
+    public void expand(final String format, final SeekableByteChannel archive, final File targetDirectory,
+        final CloseableConsumer closeableConsumer)
         throws IOException, ArchiveException {
         try (CloseableConsumerAdapter c = new CloseableConsumerAdapter(closeableConsumer)) {
         if (!prefersSeekableByteChannel(format)) {
@@ -256,7 +256,7 @@ public class Expander {
      * @throws IOException if an I/O error occurs
      * @throws ArchiveException if the archive cannot be read for other reasons
      */
-    public void expand(final ArchiveInputStream archive, File targetDirectory)
+    public void expand(final ArchiveInputStream archive, final File targetDirectory)
         throws IOException, ArchiveException {
         expand(new ArchiveEntrySupplier() {
             @Override
@@ -269,7 +269,7 @@ public class Expander {
             }
         }, new EntryWriter() {
             @Override
-            public void writeEntryDataTo(ArchiveEntry entry, OutputStream out) throws IOException {
+            public void writeEntryDataTo(final ArchiveEntry entry, final OutputStream out) throws IOException {
                 IOUtils.copy(archive, out);
             }
         }, targetDirectory);
@@ -283,7 +283,7 @@ public class Expander {
      * @throws IOException if an I/O error occurs
      * @throws ArchiveException if the archive cannot be read for other reasons
      */
-    public void expand(final ZipFile archive, File targetDirectory)
+    public void expand(final ZipFile archive, final File targetDirectory)
         throws IOException, ArchiveException {
         final Enumeration<ZipArchiveEntry> entries = archive.getEntries();
         expand(new ArchiveEntrySupplier() {
@@ -297,7 +297,7 @@ public class Expander {
             }
         }, new EntryWriter() {
             @Override
-            public void writeEntryDataTo(ArchiveEntry entry, OutputStream out) throws IOException {
+            public void writeEntryDataTo(final ArchiveEntry entry, final OutputStream out) throws IOException {
                 try (InputStream in = archive.getInputStream((ZipArchiveEntry) entry)) {
                     IOUtils.copy(in, out);
                 }
@@ -313,7 +313,7 @@ public class Expander {
      * @throws IOException if an I/O error occurs
      * @throws ArchiveException if the archive cannot be read for other reasons
      */
-    public void expand(final SevenZFile archive, File targetDirectory)
+    public void expand(final SevenZFile archive, final File targetDirectory)
         throws IOException, ArchiveException {
         expand(new ArchiveEntrySupplier() {
             @Override
@@ -322,7 +322,7 @@ public class Expander {
             }
         }, new EntryWriter() {
             @Override
-            public void writeEntryDataTo(ArchiveEntry entry, OutputStream out) throws IOException {
+            public void writeEntryDataTo(final ArchiveEntry entry, final OutputStream out) throws IOException {
                 final byte[] buffer = new byte[8024];
                 int n;
                 while (-1 != (n = archive.read(buffer))) {
@@ -332,11 +332,11 @@ public class Expander {
         }, targetDirectory);
     }
 
-    private boolean prefersSeekableByteChannel(String format) {
+    private boolean prefersSeekableByteChannel(final String format) {
         return ArchiveStreamFactory.ZIP.equalsIgnoreCase(format) || ArchiveStreamFactory.SEVEN_Z.equalsIgnoreCase(format);
     }
 
-    private void expand(ArchiveEntrySupplier supplier, EntryWriter writer, File targetDirectory)
+    private void expand(final ArchiveEntrySupplier supplier, final EntryWriter writer, final File targetDirectory)
         throws IOException {
         String targetDirPath = targetDirectory.getCanonicalPath();
         if (!targetDirPath.endsWith(File.separator)) {
@@ -344,7 +344,7 @@ public class Expander {
         }
         ArchiveEntry nextEntry = supplier.getNextReadableEntry();
         while (nextEntry != null) {
-            File f = new File(targetDirectory, nextEntry.getName());
+            final File f = new File(targetDirectory, nextEntry.getName());
             if (!f.getCanonicalPath().startsWith(targetDirPath)) {
                 throw new IOException("Expanding " + nextEntry.getName()
                     + " would create file outside of " + targetDirectory);
@@ -354,7 +354,7 @@ public class Expander {
                     throw new IOException("Failed to create directory " + f);
                 }
             } else {
-                File parent = f.getParentFile();
+                final File parent = f.getParentFile();
                 if (!parent.isDirectory() && !parent.mkdirs()) {
                     throw new IOException("Failed to create directory " + parent);
                 }
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/AES256SHA256Decoder.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/AES256SHA256Decoder.java
index caa9217..45f468b 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/AES256SHA256Decoder.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/AES256SHA256Decoder.java
@@ -32,7 +32,7 @@ import org.apache.commons.compress.PasswordRequiredException;
 class AES256SHA256Decoder extends CoderBase {
     @Override
     InputStream decode(final String archiveName, final InputStream in, final long uncompressedLength,
-            final Coder coder, final byte[] passwordBytes, int maxMemoryLimitInKb) throws IOException {
+            final Coder coder, final byte[] passwordBytes, final int maxMemoryLimitInKb) throws IOException {
         return new InputStream() {
             private boolean isInitialized = false;
             private CipherInputStream cipherInputStream = null;
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/BoundedSeekableByteChannelInputStream.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/BoundedSeekableByteChannelInputStream.java
index 203f5fb..364403a 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/BoundedSeekableByteChannelInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/BoundedSeekableByteChannelInputStream.java
@@ -43,7 +43,7 @@ class BoundedSeekableByteChannelInputStream extends InputStream {
     public int read() throws IOException {
         if (bytesRemaining > 0) {
             --bytesRemaining;
-            int read = read(1);
+            final int read = read(1);
             if (read < 0) {
                 return read;
             }
@@ -92,9 +92,9 @@ class BoundedSeekableByteChannelInputStream extends InputStream {
         return bytesRead;
     }
 
-    private int read(int len) throws IOException {
+    private int read(final int len) throws IOException {
         buffer.rewind().limit(len);
-        int read = channel.read(buffer);
+        final int read = channel.read(buffer);
         buffer.flip();
         return read;
     }
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/Coders.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/Coders.java
index 7d1c689..8e3394c 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/Coders.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/Coders.java
@@ -69,7 +69,7 @@ class Coders {
     }
 
     static InputStream addDecoder(final String archiveName, final InputStream is, final long uncompressedLength,
-            final Coder coder, final byte[] password, int maxMemoryLimitInKb) throws IOException {
+            final Coder coder, final byte[] password, final int maxMemoryLimitInKb) throws IOException {
         final CoderBase cb = findByMethod(SevenZMethod.byId(coder.decompressionMethodId));
         if (cb == null) {
             throw new IOException("Unsupported compression method " +
@@ -91,7 +91,7 @@ class Coders {
     static class CopyDecoder extends CoderBase {
         @Override
         InputStream decode(final String archiveName, final InputStream in, final long uncompressedLength,
-                final Coder coder, final byte[] password, int maxMemoryLimitInKb) throws IOException {
+                final Coder coder, final byte[] password, final int maxMemoryLimitInKb) throws IOException {
             return in;
         }
         @Override
@@ -108,7 +108,7 @@ class Coders {
 
         @Override
         InputStream decode(final String archiveName, final InputStream in, final long uncompressedLength,
-                final Coder coder, final byte[] password, int maxMemoryLimitInKb) throws IOException {
+                final Coder coder, final byte[] password, final int maxMemoryLimitInKb) throws IOException {
             try {
                 return opts.getInputStream(in);
             } catch (final AssertionError e) {
@@ -135,7 +135,7 @@ class Coders {
         @SuppressWarnings("resource") // caller must close the InputStream
         @Override
         InputStream decode(final String archiveName, final InputStream in, final long uncompressedLength,
-                final Coder coder, final byte[] password, int maxMemoryLimitInKb)
+                final Coder coder, final byte[] password, final int maxMemoryLimitInKb)
             throws IOException {
             final Inflater inflater = new Inflater(true);
             // Inflater with nowrap=true has this odd contract for a zero padding
@@ -160,8 +160,8 @@ class Coders {
               InflaterInputStream inflaterInputStream;
               Inflater inflater;
 
-            public DeflateDecoderInputStream(InflaterInputStream inflaterInputStream,
-                Inflater inflater) {
+            public DeflateDecoderInputStream(final InflaterInputStream inflaterInputStream,
+                final Inflater inflater) {
                 this.inflaterInputStream = inflaterInputStream;
                 this.inflater = inflater;
             }
@@ -196,8 +196,8 @@ class Coders {
               DeflaterOutputStream deflaterOutputStream;
               Deflater deflater;
 
-            public DeflateDecoderOutputStream(DeflaterOutputStream deflaterOutputStream,
-                Deflater deflater) {
+            public DeflateDecoderOutputStream(final DeflaterOutputStream deflaterOutputStream,
+                final Deflater deflater) {
                 this.deflaterOutputStream = deflaterOutputStream;
                 this.deflater = deflater;
             }
@@ -236,7 +236,7 @@ class Coders {
         @SuppressWarnings("resource") // caller must close the InputStream
         @Override
         InputStream decode(final String archiveName, final InputStream in, final long uncompressedLength,
-                final Coder coder, final byte[] password, int maxMemoryLimitInKb)
+                final Coder coder, final byte[] password, final int maxMemoryLimitInKb)
             throws IOException {
             return new Deflate64CompressorInputStream(in);
         }
@@ -249,7 +249,7 @@ class Coders {
 
         @Override
         InputStream decode(final String archiveName, final InputStream in, final long uncompressedLength,
-                final Coder coder, final byte[] password, int maxMemoryLimitInKb)
+                final Coder coder, final byte[] password, final int maxMemoryLimitInKb)
                 throws IOException {
             return new BZip2CompressorInputStream(in);
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/DeltaDecoder.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/DeltaDecoder.java
index c149e1a..de947ac 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/DeltaDecoder.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/DeltaDecoder.java
@@ -31,7 +31,7 @@ class DeltaDecoder extends CoderBase {
 
     @Override
     InputStream decode(final String archiveName, final InputStream in, final long uncompressedLength,
-            final Coder coder, final byte[] password, int maxMemoryLimitInKb) throws IOException {
+            final Coder coder, final byte[] password, final int maxMemoryLimitInKb) throws IOException {
         return new DeltaOptions(getOptionsFromCoder(coder)).getInputStream(in);
     }
 
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMA2Decoder.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMA2Decoder.java
index f20c861..1716dc8 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMA2Decoder.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMA2Decoder.java
@@ -34,7 +34,7 @@ class LZMA2Decoder extends CoderBase {
 
     @Override
     InputStream decode(final String archiveName, final InputStream in, final long uncompressedLength,
-            final Coder coder, final byte[] password, int maxMemoryLimitInKb) throws IOException {
+            final Coder coder, final byte[] password, final int maxMemoryLimitInKb) throws IOException {
         try {
             final int dictionarySize = getDictionarySize(coder);
             final int memoryUsageInKb = LZMA2InputStream.getMemoryUsage(dictionarySize);
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMADecoder.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMADecoder.java
index 45080b9..c1e8eda 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMADecoder.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMADecoder.java
@@ -35,7 +35,7 @@ class LZMADecoder extends CoderBase {
 
     @Override
     InputStream decode(final String archiveName, final InputStream in, final long uncompressedLength,
-            final Coder coder, final byte[] password, int maxMemoryLimitInKb) throws IOException {
+            final Coder coder, final byte[] password, final int maxMemoryLimitInKb) throws IOException {
         if (coder.properties == null) {
             throw new IOException("Missing LZMA properties");
         }
@@ -66,8 +66,8 @@ class LZMADecoder extends CoderBase {
     byte[] getOptionsAsProperties(final Object opts) throws IOException {
         final LZMA2Options options = getOptions(opts);
         final byte props = (byte) ((options.getPb() * 5 + options.getLp()) * 9 + options.getLc());
-        int dictSize = options.getDictSize();
-        byte[] o = new byte[5];
+        final int dictSize = options.getDictSize();
+        final byte[] o = new byte[5];
         o[0] = props;
         ByteUtils.toLittleEndian(o, dictSize, 1, 4);
         return o;
@@ -83,11 +83,11 @@ class LZMADecoder extends CoderBase {
         }
         final byte propsByte = coder.properties[0];
         int props = propsByte & 0xFF;
-        int pb = props / (9 * 5);
+        final int pb = props / (9 * 5);
         props -= pb * 9 * 5;
-        int lp = props / 9;
-        int lc = props - lp * 9;
-        LZMA2Options opts = new LZMA2Options();
+        final int lp = props / 9;
+        final int lc = props - lp * 9;
+        final LZMA2Options opts = new LZMA2Options();
         opts.setPb(pb);
         opts.setLcLp(lc, lp);
         opts.setDictSize(getDictionarySize(coder));
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java
index 04ae07d..620fb37 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java
@@ -494,7 +494,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
     }
 
     @Override
-    public boolean equals(Object obj) {
+    public boolean equals(final Object obj) {
         if (this == obj) {
             return true;
         }
@@ -551,16 +551,16 @@ public class SevenZArchiveEntry implements ArchiveEntry {
         return ((date.getTime() - ntfsEpoch.getTimeInMillis())* 1000 * 10);
     }
 
-    private boolean equalSevenZMethods(Iterable<? extends SevenZMethodConfiguration> c1,
-        Iterable<? extends SevenZMethodConfiguration> c2) {
+    private boolean equalSevenZMethods(final Iterable<? extends SevenZMethodConfiguration> c1,
+        final Iterable<? extends SevenZMethodConfiguration> c2) {
         if (c1 == null) {
             return c2 == null;
         }
         if (c2 == null) {
             return false;
         }
-        Iterator<? extends SevenZMethodConfiguration> i1 = c1.iterator();
-        Iterator<? extends SevenZMethodConfiguration> i2 = c2.iterator();
+        final Iterator<? extends SevenZMethodConfiguration> i1 = c1.iterator();
+        final Iterator<? extends SevenZMethodConfiguration> i2 = c2.iterator();
         while (i1.hasNext()) {
             if (!i2.hasNext()) {
                 return false;
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
index 9722764..2a50457 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
@@ -124,7 +124,7 @@ public class SevenZFile implements Closeable {
      * @throws IOException if reading the archive fails or the memory limit (if set) is too small
      * @since 1.19
      */
-    public SevenZFile(final File fileName, final char[] password, SevenZFileOptions options) throws IOException {
+    public SevenZFile(final File fileName, final char[] password, final SevenZFileOptions options) throws IOException {
         this(Files.newByteChannel(fileName.toPath(), EnumSet.of(StandardOpenOption.READ)), // NOSONAR
                 fileName.getAbsolutePath(), utf16Decode(password), true, options);
     }
@@ -172,7 +172,7 @@ public class SevenZFile implements Closeable {
      * @throws IOException if reading the archive fails or the memory limit (if set) is too small
      * @since 1.19
      */
-    public SevenZFile(final SeekableByteChannel channel, SevenZFileOptions options) throws IOException {
+    public SevenZFile(final SeekableByteChannel channel, final SevenZFileOptions options) throws IOException {
         this(channel, DEFAULT_FILE_NAME, (char[]) null, options);
     }
 
@@ -224,7 +224,7 @@ public class SevenZFile implements Closeable {
      * @throws IOException if reading the archive fails
      * @since 1.17
      */
-    public SevenZFile(final SeekableByteChannel channel, String fileName,
+    public SevenZFile(final SeekableByteChannel channel, final String fileName,
                       final char[] password) throws IOException {
         this(channel, fileName, password, SevenZFileOptions.DEFAULT);
     }
@@ -243,7 +243,7 @@ public class SevenZFile implements Closeable {
      * @throws IOException if reading the archive fails or the memory limit (if set) is too small
      * @since 1.19
      */
-    public SevenZFile(final SeekableByteChannel channel, String fileName, final char[] password,
+    public SevenZFile(final SeekableByteChannel channel, final String fileName, final char[] password,
             final SevenZFileOptions options) throws IOException {
         this(channel, fileName, utf16Decode(password), false, options);
     }
@@ -260,7 +260,7 @@ public class SevenZFile implements Closeable {
      * @throws IOException if reading the archive fails
      * @since 1.17
      */
-    public SevenZFile(final SeekableByteChannel channel, String fileName)
+    public SevenZFile(final SeekableByteChannel channel, final String fileName)
         throws IOException {
         this(channel, fileName, SevenZFileOptions.DEFAULT);
     }
@@ -278,7 +278,7 @@ public class SevenZFile implements Closeable {
      * @throws IOException if reading the archive fails or the memory limit (if set) is too small
      * @since 1.19
      */
-    public SevenZFile(final SeekableByteChannel channel, String fileName, final SevenZFileOptions options)
+    public SevenZFile(final SeekableByteChannel channel, final String fileName, final SevenZFileOptions options)
             throws IOException {
         this(channel, fileName, null, false, options);
     }
@@ -321,13 +321,13 @@ public class SevenZFile implements Closeable {
      * @deprecated use the char[]-arg version for the password instead
      */
     @Deprecated
-    public SevenZFile(final SeekableByteChannel channel, String fileName,
+    public SevenZFile(final SeekableByteChannel channel, final String fileName,
                       final byte[] password) throws IOException {
         this(channel, fileName, password, false, SevenZFileOptions.DEFAULT);
     }
 
-    private SevenZFile(final SeekableByteChannel channel, String filename,
-                       final byte[] password, boolean closeOnError, SevenZFileOptions options) throws IOException {
+    private SevenZFile(final SeekableByteChannel channel, final String filename,
+                       final byte[] password, final boolean closeOnError, final SevenZFileOptions options) throws IOException {
         boolean succeeded = false;
         this.channel = channel;
         this.fileName = filename;
@@ -427,7 +427,7 @@ public class SevenZFile implements Closeable {
     }
 
     private Archive readHeaders(final byte[] password) throws IOException {
-        ByteBuffer buf = ByteBuffer.allocate(12 /* signature + 2 bytes version + 4 bytes CRC */)
+        final ByteBuffer buf = ByteBuffer.allocate(12 /* signature + 2 bytes version + 4 bytes CRC */)
             .order(ByteOrder.LITTLE_ENDIAN);
         readFully(buf);
         final byte[] signature = new byte[6];
@@ -447,8 +447,8 @@ public class SevenZFile implements Closeable {
         final long startHeaderCrc = 0xffffFFFFL & buf.getInt();
         if (startHeaderCrc == 0) {
             // This is an indication of a corrupt header - peek the next 20 bytes
-            long currentPosition = channel.position();
-            ByteBuffer peekBuf = ByteBuffer.allocate(20);
+            final long currentPosition = channel.position();
+            final ByteBuffer peekBuf = ByteBuffer.allocate(20);
             readFully(peekBuf);
             channel.position(currentPosition);
             // Header invalid if all data is 0
@@ -472,7 +472,7 @@ public class SevenZFile implements Closeable {
     }
 
     private Archive tryToLocateEndHeader(final byte[] password) throws IOException {
-        ByteBuffer nidBuf = ByteBuffer.allocate(1);
+        final ByteBuffer nidBuf = ByteBuffer.allocate(1);
         final long searchLimit = 1024l * 1024 * 1;
         // Main header, plus bytes that readStartHeader would read
         final long previousDataSize = channel.position() + 20;
@@ -490,7 +490,7 @@ public class SevenZFile implements Closeable {
             channel.position(pos);
             nidBuf.rewind();
             channel.read(nidBuf);
-            int nid = nidBuf.array()[0];
+            final int nid = nidBuf.array()[0];
             // First indicator: Byte equals one of these header identifiers
             if (nid == NID.kEncodedHeader || nid == NID.kHeader) {
                 try {
@@ -498,12 +498,12 @@ public class SevenZFile implements Closeable {
                     final StartHeader startHeader = new StartHeader();
                     startHeader.nextHeaderOffset = pos - previousDataSize;
                     startHeader.nextHeaderSize = channel.size() - pos;
-                    Archive result = initializeArchive(startHeader, password, false);
+                    final Archive result = initializeArchive(startHeader, password, false);
                     // Sanity check: There must be some data...
                     if (result.packSizes != null && result.files.length > 0) {
                         return result;
                     }
-                } catch (Exception ignore) {
+                } catch (final Exception ignore) {
                     // Wrong guess...
                 }
             }
@@ -511,7 +511,7 @@ public class SevenZFile implements Closeable {
         throw new IOException("Start header corrupt and unable to guess end header");
     }
 
-    private Archive initializeArchive(StartHeader startHeader, final byte[] password, boolean verifyCrc) throws IOException {
+    private Archive initializeArchive(final StartHeader startHeader, final byte[] password, final boolean verifyCrc) throws IOException {
         assertFitsIntoInt("nextHeaderSize", startHeader.nextHeaderSize);
         final int nextHeaderSizeInt = (int) startHeader.nextHeaderSize;
         channel.position(SIGNATURE_HEADER_SIZE + startHeader.nextHeaderOffset);
@@ -1159,7 +1159,7 @@ public class SevenZFile implements Closeable {
      * @param isRandomAccess is this called in a random access
      * @throws IOException if there are exceptions when reading the file
      */
-    private void buildDecodingStream(int entryIndex, boolean isRandomAccess) throws IOException {
+    private void buildDecodingStream(final int entryIndex, final boolean isRandomAccess) throws IOException {
         if (archive.streamMap == null) {
             throw new IOException("Archive doesn't contain stream information to read entries");
         }
@@ -1186,8 +1186,8 @@ public class SevenZFile implements Closeable {
             // the content methods should be set to methods of the first entry as it must not be null,
             // and the content methods would only be set if the content methods was not set
             if(isRandomAccess && file.getContentMethods() == null) {
-                int folderFirstFileIndex = archive.streamMap.folderFirstFileIndex[folderIndex];
-                SevenZArchiveEntry folderFirstFile = archive.files[folderFirstFileIndex];
+                final int folderFirstFileIndex = archive.streamMap.folderFirstFileIndex[folderIndex];
+                final SevenZArchiveEntry folderFirstFile = archive.files[folderFirstFileIndex];
                 file.setContentMethods(folderFirstFile.getContentMethods());
             }
             isInSameFolder = true;
@@ -1227,7 +1227,7 @@ public class SevenZFile implements Closeable {
      * @param file        the 7z entry to read
      * @throws IOException if exceptions occur when reading the 7z file
      */
-    private void reopenFolderInputStream(int folderIndex, SevenZArchiveEntry file) throws IOException {
+    private void reopenFolderInputStream(final int folderIndex, final SevenZArchiveEntry file) throws IOException {
         deferredBlockStreams.clear();
         if (currentFolderInputStream != null) {
             currentFolderInputStream.close();
@@ -1264,7 +1264,7 @@ public class SevenZFile implements Closeable {
      * @throws IOException there are exceptions when skipping entries
      * @since 1.21
      */
-    private boolean skipEntriesWhenNeeded(int entryIndex, boolean isInSameFolder, int folderIndex) throws IOException {
+    private boolean skipEntriesWhenNeeded(final int entryIndex, final boolean isInSameFolder, final int folderIndex) throws IOException {
         final SevenZArchiveEntry file = archive.files[entryIndex];
         // if the entry to be read is the current entry, and the entry has not
         // been read yet, then there's nothing we need to do
@@ -1291,7 +1291,7 @@ public class SevenZFile implements Closeable {
         }
 
         for (int i = filesToSkipStartIndex; i < entryIndex; i++) {
-            SevenZArchiveEntry fileToSkip = archive.files[i];
+            final SevenZArchiveEntry fileToSkip = archive.files[i];
             InputStream fileStreamToSkip = new BoundedInputStream(currentFolderInputStream, fileToSkip.getSize());
             if (fileToSkip.getHasCrc()) {
                 fileStreamToSkip = new CRC32VerifyingInputStream(fileStreamToSkip, fileToSkip.getSize(), fileToSkip.getCrcValue());
@@ -1315,7 +1315,7 @@ public class SevenZFile implements Closeable {
     private boolean hasCurrentEntryBeenRead() {
         boolean hasCurrentEntryBeenRead = false;
         if (deferredBlockStreams.size() > 0) {
-            InputStream currentEntryInputStream = deferredBlockStreams.get(deferredBlockStreams.size() - 1);
+            final InputStream currentEntryInputStream = deferredBlockStreams.get(deferredBlockStreams.size() - 1);
             // get the bytes remaining to read, and compare it with the size of
             // the file to figure out if the file has been read
             if (currentEntryInputStream instanceof CRC32VerifyingInputStream) {
@@ -1358,7 +1358,7 @@ public class SevenZFile implements Closeable {
                 }
                 return r;
             }
-            private void count(int c) {
+            private void count(final int c) {
                 compressedBytesReadFromCurrentEntry += c;
             }
         };
@@ -1389,7 +1389,7 @@ public class SevenZFile implements Closeable {
      *             if an I/O error has occurred
      */
     public int read() throws IOException {
-        int b = getCurrentStream().read();
+        final int b = getCurrentStream().read();
         if (b >= 0) {
             uncompressedBytesReadFromCurrentEntry++;
         }
@@ -1429,7 +1429,7 @@ public class SevenZFile implements Closeable {
      * @throws IOException if unable to create an input stream from the zipentry
      * @since Compress 1.20
      */
-    public InputStream getInputStream(SevenZArchiveEntry entry) throws IOException {
+    public InputStream getInputStream(final SevenZArchiveEntry entry) throws IOException {
         int entryIndex = -1;
         for (int i = 0; i < this.archive.files.length;i++) {
             if (entry == this.archive.files[i]) {
@@ -1474,7 +1474,7 @@ public class SevenZFile implements Closeable {
         if (len == 0) {
             return 0;
         }
-        int cnt = getCurrentStream().read(b, off, len);
+        final int cnt = getCurrentStream().read(b, off, len);
         if (cnt > 0) {
             uncompressedBytesReadFromCurrentEntry += cnt;
         }
@@ -1516,7 +1516,7 @@ public class SevenZFile implements Closeable {
         return value;
     }
 
-    private static int getUnsignedByte(ByteBuffer buf) {
+    private static int getUnsignedByte(final ByteBuffer buf) {
         return buf.get() & 0xff;
     }
 
@@ -1547,8 +1547,8 @@ public class SevenZFile implements Closeable {
         if (bytesToSkip < 1) {
             return 0;
         }
-        int current = input.position();
-        int maxSkip = input.remaining();
+        final int current = input.position();
+        final int maxSkip = input.remaining();
         if (maxSkip < bytesToSkip) {
             bytesToSkip = maxSkip;
         }
@@ -1556,7 +1556,7 @@ public class SevenZFile implements Closeable {
         return bytesToSkip;
     }
 
-    private void readFully(ByteBuffer buf) throws IOException {
+    private void readFully(final ByteBuffer buf) throws IOException {
         buf.rewind();
         IOUtils.readFully(channel, buf);
         buf.flip();
@@ -1599,20 +1599,20 @@ public class SevenZFile implements Closeable {
 
     private static final CharsetEncoder PASSWORD_ENCODER = StandardCharsets.UTF_16LE.newEncoder();
 
-    private static byte[] utf16Decode(char[] chars) throws IOException {
+    private static byte[] utf16Decode(final char[] chars) throws IOException {
         if (chars == null) {
             return null;
         }
-        ByteBuffer encoded = PASSWORD_ENCODER.encode(CharBuffer.wrap(chars));
+        final ByteBuffer encoded = PASSWORD_ENCODER.encode(CharBuffer.wrap(chars));
         if (encoded.hasArray()) {
             return encoded.array();
         }
-        byte[] e = new byte[encoded.remaining()];
+        final byte[] e = new byte[encoded.remaining()];
         encoded.get(e);
         return e;
     }
 
-    private static void assertFitsIntoInt(String what, long value) throws IOException {
+    private static void assertFitsIntoInt(final String what, final long value) throws IOException {
         if (value > Integer.MAX_VALUE || value < Integer.MIN_VALUE) {
             throw new IOException("Cannot handle " + what + " " + value);
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFileOptions.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFileOptions.java
index 3de2d2c..4869225 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFileOptions.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFileOptions.java
@@ -30,7 +30,7 @@ public class SevenZFileOptions {
     private final int maxMemoryLimitInKb;
     private final boolean useDefaultNameForUnnamedEntries;
 
-    private SevenZFileOptions(int maxMemoryLimitInKb, boolean useDefaultNameForUnnamedEntries) {
+    private SevenZFileOptions(final int maxMemoryLimitInKb, final boolean useDefaultNameForUnnamedEntries) {
         this.maxMemoryLimitInKb = maxMemoryLimitInKb;
         this.useDefaultNameForUnnamedEntries = useDefaultNameForUnnamedEntries;
     }
@@ -90,7 +90,7 @@ public class SevenZFileOptions {
          * @param maxMemoryLimitInKb limit of the maximum amount of memory to use
          * @return the reconfigured builder
          */
-        public Builder withMaxMemoryLimitInKb(int maxMemoryLimitInKb) {
+        public Builder withMaxMemoryLimitInKb(final int maxMemoryLimitInKb) {
             this.maxMemoryLimitInKb = maxMemoryLimitInKb;
             return this;
         }
@@ -103,7 +103,7 @@ public class SevenZFileOptions {
          * unnamed entries will be set to the archive's default name
          * @return the reconfigured builder
          */
-        public Builder withUseDefaultNameForUnnamedEntries(boolean useDefaultNameForUnnamedEntries) {
+        public Builder withUseDefaultNameForUnnamedEntries(final boolean useDefaultNameForUnnamedEntries) {
             this.useDefaultNameForUnnamedEntries = useDefaultNameForUnnamedEntries;
             return this;
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethodConfiguration.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethodConfiguration.java
index 664c6f4..a93bf7d 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethodConfiguration.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethodConfiguration.java
@@ -87,7 +87,7 @@ public class SevenZMethodConfiguration {
     }
 
     @Override
-    public boolean equals(Object obj) {
+    public boolean equals(final Object obj) {
         if (this == obj) {
             return true;
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java
index e09542c..743b94c 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java
@@ -175,7 +175,7 @@ public class SevenZOutputFile implements Closeable {
      * @since 1.21
      */
     public SevenZArchiveEntry createArchiveEntry(final Path inputPath,
-        final String entryName, LinkOption... options) throws IOException {
+        final String entryName, final LinkOption... options) throws IOException {
         final SevenZArchiveEntry entry = new SevenZArchiveEntry();
         entry.setDirectory(Files.isDirectory(inputPath, options));
         entry.setName(entryName);
@@ -288,7 +288,7 @@ public class SevenZOutputFile implements Closeable {
      * @throws IOException if an I/O error occurs.
      * @since 1.21
      */
-    public void write(final Path path, OpenOption... options) throws IOException {
+    public void write(final Path path, final OpenOption... options) throws IOException {
         try (InputStream in = new BufferedInputStream(Files.newInputStream(path, options))) {
             write(in);
         }
@@ -318,7 +318,7 @@ public class SevenZOutputFile implements Closeable {
         final CRC32 crc32 = new CRC32();
         crc32.update(headerBytes);
 
-        ByteBuffer bb = ByteBuffer.allocate(SevenZFile.sevenZSignature.length
+        final ByteBuffer bb = ByteBuffer.allocate(SevenZFile.sevenZSignature.length
                                             + 2 /* version */
                                             + 4 /* start header CRC */
                                             + 8 /* next header position */
diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
index c9487ba..a1f546e 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
@@ -260,7 +260,7 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
     /**
      * Construct an empty entry and prepares the header values.
      */
-    private TarArchiveEntry(boolean preserveAbsolutePath) {
+    private TarArchiveEntry(final boolean preserveAbsolutePath) {
         String user = System.getProperty("user.name", "");
 
         if (user.length() > MAX_NAMELEN) {
@@ -420,7 +420,7 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
 
         try {
             readFileMode(this.file, normalizedName);
-        } catch (IOException e) {
+        } catch (final IOException e) {
             // Ignore exceptions from NIO for backwards compatibility
             // Fallback to get size of file if it's no directory to the old file api
             if (!file.isDirectory()) {
@@ -431,7 +431,7 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
         this.userName = "";
         try {
             readOsSpecificProperties(this.file);
-        } catch (IOException e) {
+        } catch (final IOException e) {
             // Ignore exceptions from NIO for backwards compatibility
             // Fallback to get the last modified date of the file from the old file api
             this.modTime = file.lastModified() / MILLIS_PER_SECOND;
@@ -468,7 +468,7 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
     }
 
     private void readOsSpecificProperties(final Path file, final LinkOption... options) throws IOException {
-        Set<String> availableAttributeViews = file.getFileSystem().supportedFileAttributeViews();
+        final Set<String> availableAttributeViews = file.getFileSystem().supportedFileAttributeViews();
         if (availableAttributeViews.contains("posix")) {
             final PosixFileAttributes posixFileAttributes = Files.readAttributes(file, PosixFileAttributes.class, options);
             setModTime(posixFileAttributes.lastModifiedTime());
@@ -547,7 +547,7 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
      * @throws IllegalArgumentException if any of the numeric fields have an invalid format
      * @throws IOException on error
      */
-    public TarArchiveEntry(final byte[] headerBuf, final ZipEncoding encoding, boolean lenient)
+    public TarArchiveEntry(final byte[] headerBuf, final ZipEncoding encoding, final boolean lenient)
         throws IOException {
         this(false);
         parseTarHeader(headerBuf, encoding, false, lenient);
@@ -897,7 +897,7 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
      * @param sparseHeaders The new sparse headers
      * @since 1.20
      */
-    public void setSparseHeaders(List<TarArchiveStructSparse> sparseHeaders) {
+    public void setSparseHeaders(final List<TarArchiveStructSparse> sparseHeaders) {
         this.sparseHeaders = sparseHeaders;
     }
 
@@ -1208,7 +1208,7 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
      * @param value value of header.
      * @since 1.15
      */
-    public void addPaxHeader(String name,String value) {
+    public void addPaxHeader(final String name,final String value) {
          processPaxHeader(name,value);
     }
 
@@ -1218,7 +1218,7 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
      * @return The value of the header, if any.
      * @since 1.15
      */
-    public String getExtraPaxHeader(String name) {
+    public String getExtraPaxHeader(final String name) {
         return extraPaxHeaders.get(name);
     }
 
@@ -1227,7 +1227,7 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
      * @param headers
      * @since 1.15
      */
-    void updateEntryFromPaxHeaders(Map<String, String> headers) {
+    void updateEntryFromPaxHeaders(final Map<String, String> headers) {
         for (final Map.Entry<String, String> ent : headers.entrySet()) {
             final String key = ent.getKey();
             final String val = ent.getValue();
@@ -1242,7 +1242,7 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
      * @param val
      * @since 1.15
      */
-    private void processPaxHeader(String key, String val) {
+    private void processPaxHeader(final String key, final String val) {
         processPaxHeader(key,val,extraPaxHeaders);
     }
 
@@ -1256,7 +1256,7 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
      * @throws NumberFormatException  if encountered errors when parsing the numbers
      * @since 1.15
      */
-    private void processPaxHeader(String key, String val, Map<String, String> headers) {
+    private void processPaxHeader(final String key, final String val, final Map<String, String> headers) {
     /*
      * The following headers are defined for Pax.
      * atime, ctime, charset: cannot use these without changing TarArchiveEntry fields
@@ -1340,14 +1340,14 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
             return EMPTY_TAR_ARCHIVE_ENTRIES;
         }
 
-        List<TarArchiveEntry> entries = new ArrayList<>();
+        final List<TarArchiveEntry> entries = new ArrayList<>();
         try (DirectoryStream<Path> dirStream = Files.newDirectoryStream(file)) {
-            Iterator<Path> iterator = dirStream.iterator();
+            final Iterator<Path> iterator = dirStream.iterator();
             while (iterator.hasNext()) {
-                Path p = iterator.next();
+                final Path p = iterator.next();
                 entries.add(new TarArchiveEntry(p));
             }
-        } catch (IOException e) {
+        } catch (final IOException e) {
             return EMPTY_TAR_ARCHIVE_ENTRIES;
         }
         return entries.toArray(new TarArchiveEntry[0]);
@@ -1528,7 +1528,7 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
             offset += PAD2LEN_GNU;
             sparseHeaders = new ArrayList<>();
             for (int i = 0; i < SPARSE_HEADERS_IN_OLDGNU_HEADER; i++) {
-                TarArchiveStructSparse sparseHeader = TarUtils.parseSparse(header,
+                final TarArchiveStructSparse sparseHeader = TarUtils.parseSparse(header,
                         offset + i * (SPARSE_OFFSET_LEN + SPARSE_NUMBYTES_LEN));
 
                 // some sparse headers are empty, we need to skip these sparse headers
@@ -1569,11 +1569,11 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
         }
     }
 
-    private long parseOctalOrBinary(byte[] header, int offset, int length, boolean lenient) {
+    private long parseOctalOrBinary(final byte[] header, final int offset, final int length, final boolean lenient) {
         if (lenient) {
             try {
                 return TarUtils.parseOctalOrBinary(header, offset, length);
-            } catch (IllegalArgumentException ex) { //NOSONAR
+            } catch (final IllegalArgumentException ex) { //NOSONAR
                 return UNKNOWN;
             }
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
index bac1ee4..5c08ba0 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
@@ -116,7 +116,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * exception instead.
      * @since 1.19
      */
-    public TarArchiveInputStream(final InputStream is, boolean lenient) {
+    public TarArchiveInputStream(final InputStream is, final boolean lenient) {
         this(is, TarConstants.DEFAULT_BLKSIZE, TarConstants.DEFAULT_RCDSIZE, null, lenient);
     }
 
@@ -187,7 +187,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * @since 1.19
      */
     public TarArchiveInputStream(final InputStream is, final int blockSize, final int recordSize,
-                                 final String encoding, boolean lenient) {
+                                 final String encoding, final boolean lenient) {
         this.inputStream = is;
         this.hasHitEOF = false;
         this.encoding = encoding;
@@ -206,7 +206,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
     public void close() throws IOException {
         // Close all the input streams in sparseInputStreams
         if(sparseInputStreams != null) {
-            for (InputStream inputStream : sparseInputStreams) {
+            for (final InputStream inputStream : sparseInputStreams) {
                 inputStream.close();
             }
         }
@@ -417,7 +417,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
             } else if (!globalPaxHeaders.isEmpty()) {
                 applyPaxHeadersToCurrentEntry(globalPaxHeaders, globalSparseHeaders);
             }
-        } catch (NumberFormatException e) {
+        } catch (final NumberFormatException e) {
             throw new IOException("Error detected parsing the pax header", e);
         }
 
@@ -596,13 +596,13 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * @return sparse headers parsed from sparse map
      * @throws IOException
      */
-    private List<TarArchiveStructSparse> parsePAX01SparseHeaders(String sparseMap) throws IOException {
-        List<TarArchiveStructSparse> sparseHeaders = new ArrayList<>();
-        String[] sparseHeaderStrings = sparseMap.split(",");
+    private List<TarArchiveStructSparse> parsePAX01SparseHeaders(final String sparseMap) throws IOException {
+        final List<TarArchiveStructSparse> sparseHeaders = new ArrayList<>();
+        final String[] sparseHeaderStrings = sparseMap.split(",");
 
         for (int i = 0; i < sparseHeaderStrings.length;i += 2) {
-            long sparseOffset = Long.parseLong(sparseHeaderStrings[i]);
-            long sparseNumbytes = Long.parseLong(sparseHeaderStrings[i + 1]);
+            final long sparseOffset = Long.parseLong(sparseHeaderStrings[i]);
+            final long sparseNumbytes = Long.parseLong(sparseHeaderStrings[i + 1]);
             sparseHeaders.add(new TarArchiveStructSparse(sparseOffset, sparseNumbytes));
         }
 
@@ -620,7 +620,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      */
     private List<TarArchiveStructSparse> parsePAX1XSparseHeaders() throws IOException {
         // for 1.X PAX Headers
-        List<TarArchiveStructSparse> sparseHeaders = new ArrayList<>();
+        final List<TarArchiveStructSparse> sparseHeaders = new ArrayList<>();
         long bytesRead = 0;
 
         long[] readResult = readLineOfNumberForPax1X(inputStream);
@@ -628,17 +628,17 @@ public class TarArchiveInputStream extends ArchiveInputStream {
         bytesRead += readResult[1];
         while (sparseHeadersCount-- > 0) {
             readResult = readLineOfNumberForPax1X(inputStream);
-            long sparseOffset = readResult[0];
+            final long sparseOffset = readResult[0];
             bytesRead += readResult[1];
 
             readResult = readLineOfNumberForPax1X(inputStream);
-            long sparseNumbytes = readResult[0];
+            final long sparseNumbytes = readResult[0];
             bytesRead += readResult[1];
             sparseHeaders.add(new TarArchiveStructSparse(sparseOffset, sparseNumbytes));
         }
 
         // skip the rest of this record data
-        long bytesToSkip = recordSize - bytesRead % recordSize;
+        final long bytesToSkip = recordSize - bytesRead % recordSize;
         IOUtils.skip(inputStream, bytesToSkip);
         return sparseHeaders;
     }
@@ -651,7 +651,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * @return the decimal number delimited by '\n', and the bytes read from input stream
      * @throws IOException
      */
-    private long[] readLineOfNumberForPax1X(InputStream inputStream) throws IOException {
+    private long[] readLineOfNumberForPax1X(final InputStream inputStream) throws IOException {
         int number;
         long result = 0;
         long bytesRead = 0;
@@ -690,7 +690,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * @return map of PAX headers values found inside of the current (local or global) PAX headers tar entry.
      * @throws IOException
      */
-    Map<String, String> parsePaxHeaders(final InputStream inputStream, List<TarArchiveStructSparse> sparseHeaders)
+    Map<String, String> parsePaxHeaders(final InputStream inputStream, final List<TarArchiveStructSparse> sparseHeaders)
         throws IOException {
         final Map<String, String> headers = new HashMap<>(globalPaxHeaders);
         Long offset = null;
@@ -921,7 +921,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * @return The number of bytes read, or -1 at EOF.
      * @throws IOException on error
      */
-    private int readSparse(final byte[] buf, final int offset, int numToRead) throws IOException {
+    private int readSparse(final byte[] buf, final int offset, final int numToRead) throws IOException {
         // if there are no actual input streams, just read from the original input stream
         if (sparseInputStreams == null || sparseInputStreams.size() == 0) {
             return inputStream.read(buf, offset, numToRead);
@@ -931,8 +931,8 @@ public class TarArchiveInputStream extends ArchiveInputStream {
             return -1;
         }
 
-        InputStream currentInputStream = sparseInputStreams.get(currentSparseInputStreamIndex);
-        int readLen = currentInputStream.read(buf, offset, numToRead);
+        final InputStream currentInputStream = sparseInputStreams.get(currentSparseInputStreamIndex);
+        final int readLen = currentInputStream.read(buf, offset, numToRead);
 
         // if the current input stream is the last input stream,
         // just return the number of bytes read from current input stream
@@ -950,7 +950,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
         // and recursively call read
         if (readLen < numToRead) {
             currentSparseInputStreamIndex++;
-            int readLenOfNext = readSparse(buf, offset + readLen, numToRead - readLen);
+            final int readLenOfNext = readSparse(buf, offset + readLen, numToRead - readLen);
             if (readLenOfNext == -1) {
                 return readLen;
             }
@@ -1071,8 +1071,8 @@ public class TarArchiveInputStream extends ArchiveInputStream {
             final Comparator<TarArchiveStructSparse> sparseHeaderComparator = new Comparator<TarArchiveStructSparse>() {
                 @Override
                 public int compare(final TarArchiveStructSparse p, final TarArchiveStructSparse q) {
-                    Long pOffset = p.getOffset();
-                    Long qOffset = q.getOffset();
+                    final Long pOffset = p.getOffset();
+                    final Long qOffset = q.getOffset();
                     return pOffset.compareTo(qOffset);
                 }
             };
@@ -1083,7 +1083,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
             // Stream doesn't need to be closed at all as it doesn't use any resources
             final InputStream zeroInputStream = new TarArchiveSparseZeroInputStream(); //NOSONAR
             long offset = 0;
-            for (TarArchiveStructSparse sparseHeader : sparseHeaders) {
+            for (final TarArchiveStructSparse sparseHeader : sparseHeaders) {
                 if (sparseHeader.getOffset() == 0 && sparseHeader.getNumbytes() == 0) {
                     break;
                 }
diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
index 86fc9bf..ece14d1 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
@@ -449,7 +449,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * @throws IOException on error
      */
     @Override
-    public void write(final byte[] wBuf, int wOffset, int numToWrite) throws IOException {
+    public void write(final byte[] wBuf, final int wOffset, final int numToWrite) throws IOException {
         if (!haveUnclosedEntry) {
             throw new IllegalStateException("No current tar entry");
         }
@@ -486,7 +486,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
         closeArchiveEntry();
     }
 
-    private byte[] encodeExtendedPaxHeadersContents(Map<String, String> headers)
+    private byte[] encodeExtendedPaxHeadersContents(final Map<String, String> headers)
         throws UnsupportedEncodingException {
         final StringWriter w = new StringWriter();
         for (final Map.Entry<String, String> h : headers.entrySet()) {
@@ -560,7 +560,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
     }
     
     @Override
-    public ArchiveEntry createArchiveEntry(Path inputPath, String entryName, LinkOption... options) throws IOException {
+    public ArchiveEntry createArchiveEntry(final Path inputPath, final String entryName, final LinkOption... options) throws IOException {
         if (finished) {
             throw new IOException("Stream has already been finished");
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseEntry.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseEntry.java
index c83b561..b738de1 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseEntry.java
@@ -46,7 +46,7 @@ public class TarArchiveSparseEntry implements TarConstants {
     /** If an extension sparse header follows. */
     private final boolean isExtended;
 
-    private List<TarArchiveStructSparse> sparseHeaders;
+    private final List<TarArchiveStructSparse> sparseHeaders;
 
     /**
      * Construct an entry from an archive's header bytes. File is set
@@ -59,7 +59,7 @@ public class TarArchiveSparseEntry implements TarConstants {
         int offset = 0;
         sparseHeaders = new ArrayList<>();
         for(int i = 0; i < SPARSE_HEADERS_IN_EXTENSION_HEADER;i++) {
-            TarArchiveStructSparse sparseHeader = TarUtils.parseSparse(headerBuf,
+            final TarArchiveStructSparse sparseHeader = TarUtils.parseSparse(headerBuf,
                     offset + i * (SPARSE_OFFSET_LEN + SPARSE_NUMBYTES_LEN));
 
             // some sparse headers are empty, we need to skip these sparse headers
diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveStructSparse.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveStructSparse.java
index d84f97b..116a15f 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveStructSparse.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveStructSparse.java
@@ -36,20 +36,20 @@ public final class TarArchiveStructSparse {
     private final long offset;
     private final long numbytes;
 
-    public TarArchiveStructSparse(long offset, long numbytes) {
+    public TarArchiveStructSparse(final long offset, final long numbytes) {
         this.offset = offset;
         this.numbytes = numbytes;
     }
 
     @Override
-    public boolean equals(Object o) {
+    public boolean equals(final Object o) {
         if (this == o) {
             return true;
         }
         if (o == null || getClass() != o.getClass()) {
             return false;
         }
-        TarArchiveStructSparse that = (TarArchiveStructSparse) o;
+        final TarArchiveStructSparse that = (TarArchiveStructSparse) o;
         return offset == that.offset &&
                 numbytes == that.numbytes;
     }
diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
index c231663..9f43bd7 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
@@ -311,8 +311,8 @@ public class TarUtils {
      * @return a parsed sparse struct
      */
     public static TarArchiveStructSparse parseSparse(final byte[] buffer, final int offset) {
-        long sparseOffset = parseOctalOrBinary(buffer, offset, SPARSE_OFFSET_LEN);
-        long sparseNumbytes = parseOctalOrBinary(buffer, offset + SPARSE_OFFSET_LEN, SPARSE_NUMBYTES_LEN);
+        final long sparseOffset = parseOctalOrBinary(buffer, offset, SPARSE_OFFSET_LEN);
+        final long sparseNumbytes = parseOctalOrBinary(buffer, offset + SPARSE_OFFSET_LEN, SPARSE_NUMBYTES_LEN);
 
         return new TarArchiveStructSparse(sparseOffset, sparseNumbytes);
     }
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java
index fba165b..3e69bb9 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java
@@ -118,7 +118,7 @@ class ExplodingInputStream extends InputStream implements InputStreamStatistics
         if (!buffer.available()) {
             try {
                 fillBuffer();
-            } catch (IllegalArgumentException ex) {
+            } catch (final IllegalArgumentException ex) {
                 throw new IOException("bad IMPLODE stream", ex);
             }
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ExtraFieldUtils.java b/src/main/java/org/apache/commons/compress/archivers/zip/ExtraFieldUtils.java
index feb46e3..dd22f03 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ExtraFieldUtils.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ExtraFieldUtils.java
@@ -86,7 +86,7 @@ public class ExtraFieldUtils {
      */
     public static ZipExtraField createExtraField(final ZipShort headerId)
         throws InstantiationException, IllegalAccessException {
-        ZipExtraField field = createExtraFieldNoDefault(headerId);
+        final ZipExtraField field = createExtraFieldNoDefault(headerId);
         if (field != null) {
             return field;
         }
@@ -157,8 +157,8 @@ public class ExtraFieldUtils {
         throws ZipException {
         return parse(data, local, new ExtraFieldParsingBehavior() {
             @Override
-            public ZipExtraField onUnparseableExtraField(byte[] data, int off, int len, boolean local,
-                int claimedLength) throws ZipException {
+            public ZipExtraField onUnparseableExtraField(final byte[] data, final int off, final int len, final boolean local,
+                final int claimedLength) throws ZipException {
                 return onUnparseableData.onUnparseableExtraField(data, off, len, local, claimedLength);
             }
 
@@ -169,7 +169,7 @@ public class ExtraFieldUtils {
             }
 
             @Override
-            public ZipExtraField fill(ZipExtraField field, byte[] data, int off, int len, boolean local)
+            public ZipExtraField fill(final ZipExtraField field, final byte[] data, final int off, final int len, final boolean local)
                 throws ZipException {
                 return fillExtraField(field, data, off, len, local);
             }
@@ -198,7 +198,7 @@ public class ExtraFieldUtils {
             final ZipShort headerId = new ZipShort(data, start);
             final int length = new ZipShort(data, start + 2).getValue();
             if (start + WORD + length > data.length) {
-                ZipExtraField field = parsingBehavior.onUnparseableExtraField(data, start, data.length - start,
+                final ZipExtraField field = parsingBehavior.onUnparseableExtraField(data, start, data.length - start,
                     local, length);
                 if (field != null) {
                     v.add(field);
@@ -209,7 +209,7 @@ public class ExtraFieldUtils {
                 break LOOP;
             }
             try {
-                ZipExtraField ze = Objects.requireNonNull(parsingBehavior.createExtraField(headerId),
+                final ZipExtraField ze = Objects.requireNonNull(parsingBehavior.createExtraField(headerId),
                     "createExtraField must not return null");
                 v.add(Objects.requireNonNull(parsingBehavior.fill(ze, data, start + WORD, length, local),
                     "fill must not return null"));
@@ -326,7 +326,7 @@ public class ExtraFieldUtils {
                 ze.parseFromCentralDirectoryData(data, off, len);
             }
             return ze;
-        } catch (ArrayIndexOutOfBoundsException aiobe) {
+        } catch (final ArrayIndexOutOfBoundsException aiobe) {
             throw (ZipException) new ZipException("Failed to parse corrupt ZIP extra field of type "
                 + Integer.toHexString(ze.getHeaderId().getValue())).initCause(aiobe);
         }
@@ -388,8 +388,8 @@ public class ExtraFieldUtils {
         public int getKey() { return key; }
 
         @Override
-        public ZipExtraField onUnparseableExtraField(byte[] data, int off, int len, boolean local,
-            int claimedLength) throws ZipException {
+        public ZipExtraField onUnparseableExtraField(final byte[] data, final int off, final int len, final boolean local,
+            final int claimedLength) throws ZipException {
             switch(key) {
             case THROW_KEY:
                 throw new ZipException("Bad extra field starting at "
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/InflaterInputStreamWithStatistics.java b/src/main/java/org/apache/commons/compress/archivers/zip/InflaterInputStreamWithStatistics.java
index b10590f..a58e43e 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/InflaterInputStreamWithStatistics.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/InflaterInputStreamWithStatistics.java
@@ -35,15 +35,15 @@ import java.util.zip.InflaterInputStream;
     private long compressedCount = 0;
     private long uncompressedCount = 0;
 
-    public InflaterInputStreamWithStatistics(InputStream in) {
+    public InflaterInputStreamWithStatistics(final InputStream in) {
         super(in);
     }
 
-    public InflaterInputStreamWithStatistics(InputStream in, Inflater inf) {
+    public InflaterInputStreamWithStatistics(final InputStream in, final Inflater inf) {
         super(in, inf);
     }
 
-    public InflaterInputStreamWithStatistics(InputStream in, Inflater inf, int size) {
+    public InflaterInputStreamWithStatistics(final InputStream in, final Inflater inf, final int size) {
         super(in, inf, size);
     }
 
@@ -63,7 +63,7 @@ import java.util.zip.InflaterInputStream;
     }
 
     @Override
-    public int read(byte[] b, int off, int len) throws IOException {
+    public int read(final byte[] b, final int off, final int len) throws IOException {
         final int bytes = super.read(b, off, len);
         if (bytes > -1) {
             uncompressedCount += bytes;
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/NioZipEncoding.java b/src/main/java/org/apache/commons/compress/archivers/zip/NioZipEncoding.java
index 401f9fa..4757074 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/NioZipEncoding.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/NioZipEncoding.java
@@ -51,7 +51,7 @@ class NioZipEncoding implements ZipEncoding, CharsetAccessor {
      * @param charset  The character set to use.
      * @param useReplacement should invalid characters be replaced, or reported.
      */
-    NioZipEncoding(final Charset charset, boolean useReplacement) {
+    NioZipEncoding(final Charset charset, final boolean useReplacement) {
         this.charset = charset;
         this.useReplacement = useReplacement;
     }
@@ -90,7 +90,7 @@ class NioZipEncoding implements ZipEncoding, CharsetAccessor {
                 // write the unmappable characters in utf-16
                 // pseudo-URL encoding style to ByteBuffer.
 
-                int spaceForSurrogate = estimateIncrementalEncodingSize(enc, 6 * res.length());
+                final int spaceForSurrogate = estimateIncrementalEncodingSize(enc, 6 * res.length());
                 if (spaceForSurrogate > out.remaining()) {
                     // if the destination buffer isn't over sized, assume that the presence of one
                     // unmappable character makes it likely that there will be more. Find all the
@@ -99,7 +99,7 @@ class NioZipEncoding implements ZipEncoding, CharsetAccessor {
                     for (int i = cb.position() ; i < cb.limit(); i++) {
                         charCount += !enc.canEncode(cb.get(i)) ? 6 : 1;
                     }
-                    int totalExtraSpace = estimateIncrementalEncodingSize(enc, charCount);
+                    final int totalExtraSpace = estimateIncrementalEncodingSize(enc, charCount);
                     out = ZipEncodingHelper.growBufferBy(out, totalExtraSpace - out.remaining());
                 }
                 if (tmp == null) {
@@ -110,7 +110,7 @@ class NioZipEncoding implements ZipEncoding, CharsetAccessor {
                 }
 
             } else if (res.isOverflow()) {
-                int increment = estimateIncrementalEncodingSize(enc, cb.remaining());
+                final int increment = estimateIncrementalEncodingSize(enc, cb.remaining());
                 out = ZipEncodingHelper.growBufferBy(out, increment);
 
             } else if (res.isUnderflow() || res.isError()) {
@@ -136,19 +136,19 @@ class NioZipEncoding implements ZipEncoding, CharsetAccessor {
             .decode(ByteBuffer.wrap(data)).toString();
     }
 
-    private static ByteBuffer encodeFully(CharsetEncoder enc, CharBuffer cb, ByteBuffer out) {
+    private static ByteBuffer encodeFully(final CharsetEncoder enc, final CharBuffer cb, final ByteBuffer out) {
         ByteBuffer o = out;
         while (cb.hasRemaining()) {
-            CoderResult result = enc.encode(cb, o, false);
+            final CoderResult result = enc.encode(cb, o, false);
             if (result.isOverflow()) {
-                int increment = estimateIncrementalEncodingSize(enc, cb.remaining());
+                final int increment = estimateIncrementalEncodingSize(enc, cb.remaining());
                 o = ZipEncodingHelper.growBufferBy(o, increment);
             }
         }
         return o;
     }
 
-    private static CharBuffer encodeSurrogate(CharBuffer cb, char c) {
+    private static CharBuffer encodeSurrogate(final CharBuffer cb, final char c) {
         cb.position(0).limit(6);
         cb.put('%');
         cb.put('U');
@@ -199,9 +199,9 @@ class NioZipEncoding implements ZipEncoding, CharsetAccessor {
      * @param charChount number of characters in string
      * @return estimated size in bytes.
      */
-    private static int estimateInitialBufferSize(CharsetEncoder enc, int charChount) {
-        float first = enc.maxBytesPerChar();
-        float rest = (charChount - 1) * enc.averageBytesPerChar();
+    private static int estimateInitialBufferSize(final CharsetEncoder enc, final int charChount) {
+        final float first = enc.maxBytesPerChar();
+        final float rest = (charChount - 1) * enc.averageBytesPerChar();
         return (int) Math.ceil(first + rest);
     }
 
@@ -212,7 +212,7 @@ class NioZipEncoding implements ZipEncoding, CharsetAccessor {
      * @param charCount number of characters remaining
      * @return estimated size in bytes.
      */
-    private static int estimateIncrementalEncodingSize(CharsetEncoder enc, int charCount) {
+    private static int estimateIncrementalEncodingSize(final CharsetEncoder enc, final int charCount) {
         return (int) Math.ceil(charCount * enc.averageBytesPerChar());
     }
 
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreator.java b/src/main/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreator.java
index 3a70f4e..86b89ff 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreator.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreator.java
@@ -230,7 +230,7 @@ public class ParallelScatterZipCreator {
         return new Callable<ScatterZipOutputStream>() {
             @Override
             public ScatterZipOutputStream call() throws Exception {
-                ScatterZipOutputStream scatterStream = tlScatterStreams.get();
+                final ScatterZipOutputStream scatterStream = tlScatterStreams.get();
                 scatterStream.addArchiveEntry(zipArchiveEntryRequest);
                 return scatterStream;
             }
@@ -257,7 +257,7 @@ public class ParallelScatterZipCreator {
         return new Callable<ScatterZipOutputStream>() {
             @Override
             public ScatterZipOutputStream call() throws Exception {
-                ScatterZipOutputStream scatterStream = tlScatterStreams.get();
+                final ScatterZipOutputStream scatterStream = tlScatterStreams.get();
                 scatterStream.addArchiveEntry(zipArchiveEntryRequestSupplier.get());
                 return scatterStream;
             }
@@ -299,7 +299,7 @@ public class ParallelScatterZipCreator {
             compressionDoneAt = System.currentTimeMillis();
 
             for (final Future<? extends ScatterZipOutputStream> future : futures) {
-                ScatterZipOutputStream scatterStream = future.get();
+                final ScatterZipOutputStream scatterStream = future.get();
                 scatterStream.zipEntryWriter().writeNextZipEntry(targetStream);
             }
 
@@ -326,7 +326,7 @@ public class ParallelScatterZipCreator {
         for (final ScatterZipOutputStream scatterStream : streams) {
             try {
                 scatterStream.close();
-            } catch (IOException ex) { //NOSONAR
+            } catch (final IOException ex) { //NOSONAR
                 // no way to properly log this
             }
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ResourceAlignmentExtraField.java b/src/main/java/org/apache/commons/compress/archivers/zip/ResourceAlignmentExtraField.java
index bc31147..2dda68b 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ResourceAlignmentExtraField.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ResourceAlignmentExtraField.java
@@ -55,15 +55,15 @@ public class ResourceAlignmentExtraField implements ZipExtraField {
     public ResourceAlignmentExtraField() {
     }
 
-    public ResourceAlignmentExtraField(int alignment) {
+    public ResourceAlignmentExtraField(final int alignment) {
         this(alignment, false);
     }
 
-    public ResourceAlignmentExtraField(int alignment, boolean allowMethodChange) {
+    public ResourceAlignmentExtraField(final int alignment, final boolean allowMethodChange) {
         this(alignment, allowMethodChange, 0);
     }
 
-    public ResourceAlignmentExtraField(int alignment, boolean allowMethodChange, int padding) {
+    public ResourceAlignmentExtraField(final int alignment, final boolean allowMethodChange, final int padding) {
         if (alignment < 0 || alignment > 0x7fff) {
             throw new IllegalArgumentException("Alignment must be between 0 and 0x7fff, was: " + alignment);
         }
@@ -112,7 +112,7 @@ public class ResourceAlignmentExtraField implements ZipExtraField {
 
     @Override
     public byte[] getLocalFileDataData() {
-        byte[] content = new byte[BASE_SIZE + padding];
+        final byte[] content = new byte[BASE_SIZE + padding];
         ZipShort.putShort(alignment | (allowMethodChange ? ALLOW_METHOD_MESSAGE_CHANGE_FLAG : 0),
                           content, 0);
         return content;
@@ -124,17 +124,17 @@ public class ResourceAlignmentExtraField implements ZipExtraField {
     }
 
     @Override
-    public void parseFromLocalFileData(byte[] buffer, int offset, int length) throws ZipException {
+    public void parseFromLocalFileData(final byte[] buffer, final int offset, final int length) throws ZipException {
         parseFromCentralDirectoryData(buffer, offset, length);
         this.padding = length - BASE_SIZE;
     }
 
     @Override
-    public void parseFromCentralDirectoryData(byte[] buffer, int offset, int length) throws ZipException {
+    public void parseFromCentralDirectoryData(final byte[] buffer, final int offset, final int length) throws ZipException {
         if (length < BASE_SIZE) {
             throw new ZipException("Too short content for ResourceAlignmentExtraField (0xa11e): " + length);
         }
-        int alignmentValue = ZipShort.getValue(buffer, offset);
+        final int alignmentValue = ZipShort.getValue(buffer, offset);
         this.alignment = (short) (alignmentValue & (ALLOW_METHOD_MESSAGE_CHANGE_FLAG - 1));
         this.allowMethodChange = (alignmentValue & ALLOW_METHOD_MESSAGE_CHANGE_FLAG) != 0;
     }
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java
index deed65e..f9edf53 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java
@@ -51,7 +51,7 @@ public class ScatterZipOutputStream implements Closeable {
     private final Queue<CompressedEntry> items = new ConcurrentLinkedQueue<>();
     private final ScatterGatherBackingStore backingStore;
     private final StreamCompressor streamCompressor;
-    private AtomicBoolean isClosed = new AtomicBoolean();
+    private final AtomicBoolean isClosed = new AtomicBoolean();
     private ZipEntryWriter zipEntryWriter = null;
 
     private static class CompressedEntry {
@@ -126,7 +126,7 @@ public class ScatterZipOutputStream implements Closeable {
         private final Iterator<CompressedEntry> itemsIterator;
         private final InputStream itemsIteratorData;
 
-        public ZipEntryWriter(ScatterZipOutputStream scatter) throws IOException {
+        public ZipEntryWriter(final ScatterZipOutputStream scatter) throws IOException {
             scatter.backingStore.closeForWriting();
             itemsIterator = scatter.items.iterator();
             itemsIteratorData = scatter.backingStore.getInputStream();
@@ -140,7 +140,7 @@ public class ScatterZipOutputStream implements Closeable {
         }
 
         public void writeNextZipEntry(final ZipArchiveOutputStream target) throws IOException {
-            CompressedEntry compressedEntry = itemsIterator.next();
+            final CompressedEntry compressedEntry = itemsIterator.next();
             try (final BoundedInputStream rawStream = new BoundedInputStream(itemsIteratorData, compressedEntry.compressedSize)) {
                 target.addRawArchiveEntry(compressedEntry.transferToArchiveEntry(), rawStream);
             }
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestamp.java b/src/main/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestamp.java
index 02f5bc9..f7f5e42 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestamp.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestamp.java
@@ -588,11 +588,11 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
         return hc;
     }
 
-    private static Date zipLongToDate(ZipLong unixTime) {
+    private static Date zipLongToDate(final ZipLong unixTime) {
         return unixTime != null ? new Date(unixTime.getIntValue() * 1000L) : null;
     }
 
-    private static ZipLong unixTimeToZipLong(long l) {
+    private static ZipLong unixTimeToZipLong(final long l) {
         if (l < Integer.MIN_VALUE || l > Integer.MAX_VALUE) {
             throw new IllegalArgumentException("X5455 timestamps must fit in a signed 32 bit integer: " + l);
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/X7875_NewUnix.java b/src/main/java/org/apache/commons/compress/archivers/zip/X7875_NewUnix.java
index 3af80a9..85f9e1a 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/X7875_NewUnix.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/X7875_NewUnix.java
@@ -168,9 +168,9 @@ public class X7875_NewUnix implements ZipExtraField, Cloneable, Serializable {
         // (e.g., so that the sign-bit is set to zero).  We need to remove that
         // before sending the number over the wire.
         uidBytes = trimLeadingZeroesForceMinLength(uidBytes);
-        int uidBytesLen = uidBytes != null ? uidBytes.length : 0;
+        final int uidBytesLen = uidBytes != null ? uidBytes.length : 0;
         gidBytes = trimLeadingZeroesForceMinLength(gidBytes);
-        int gidBytesLen = gidBytes != null ? gidBytes.length : 0;
+        final int gidBytesLen = gidBytes != null ? gidBytes.length : 0;
 
         // Couldn't bring myself to just call getLocalFileDataLength() when we've
         // already got the arrays right here.  Yeah, yeah, I know, premature
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
index 687615d..2c3ed74 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
@@ -247,7 +247,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
      * @throws IOException if an I/O error occurs.
      * @since 1.21 
      */
-    public ZipArchiveEntry(final Path inputPath, final String entryName, LinkOption... options) throws IOException {
+    public ZipArchiveEntry(final Path inputPath, final String entryName, final LinkOption... options) throws IOException {
         this(Files.isDirectory(inputPath, options) && !entryName.endsWith("/") ?
              entryName + "/" : entryName);
         if (Files.isRegularFile(inputPath, options)){
@@ -425,7 +425,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
      *      requested alignment, 0 for default.
      * @since 1.14
      */
-    public void setAlignment(int alignment) {
+    public void setAlignment(final int alignment) {
         if ((alignment & (alignment - 1)) != 0 || alignment > 0xffff) {
             throw new IllegalArgumentException("Invalid value for alignment, must be power of two and no bigger than "
                 + 0xffff + " but is " + alignment);
@@ -500,14 +500,14 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
         if (parsingBehavior == ExtraFieldParsingMode.ONLY_PARSEABLE_LENIENT) {
             return getExtraFields(false);
         }
-        byte[] local = getExtra();
-        List<ZipExtraField> localFields = new ArrayList<>(Arrays.asList(ExtraFieldUtils.parse(local, true,
+        final byte[] local = getExtra();
+        final List<ZipExtraField> localFields = new ArrayList<>(Arrays.asList(ExtraFieldUtils.parse(local, true,
             parsingBehavior)));
-        byte[] central = getCentralDirectoryExtra();
-        List<ZipExtraField> centralFields = new ArrayList<>(Arrays.asList(ExtraFieldUtils.parse(central, false,
+        final byte[] central = getCentralDirectoryExtra();
+        final List<ZipExtraField> centralFields = new ArrayList<>(Arrays.asList(ExtraFieldUtils.parse(central, false,
             parsingBehavior)));
-        List<ZipExtraField> merged = new ArrayList<>();
-        for (ZipExtraField l : localFields) {
+        final List<ZipExtraField> merged = new ArrayList<>();
+        for (final ZipExtraField l : localFields) {
             ZipExtraField c = null;
             if (l instanceof UnparseableExtraFieldData) {
                 c = findUnparseable(centralFields);
@@ -515,7 +515,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
                 c = findMatching(l.getHeaderId(), centralFields);
             }
             if (c != null) {
-                byte[] cd = c.getCentralDirectoryData();
+                final byte[] cd = c.getCentralDirectoryData();
                 if (cd != null && cd.length > 0) {
                     l.parseFromCentralDirectoryData(cd, 0, cd.length);
                 }
@@ -567,8 +567,8 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
             : allExtraFieldsNoCopy;
     }
 
-    private ZipExtraField findUnparseable(List<ZipExtraField> fs) {
-        for (ZipExtraField f : fs) {
+    private ZipExtraField findUnparseable(final List<ZipExtraField> fs) {
+        for (final ZipExtraField f : fs) {
             if (f instanceof UnparseableExtraFieldData) {
                 return f;
             }
@@ -576,8 +576,8 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
         return null;
     }
 
-    private ZipExtraField findMatching(ZipShort headerId, List<ZipExtraField> fs) {
-        for (ZipExtraField f : fs) {
+    private ZipExtraField findMatching(final ZipShort headerId, final List<ZipExtraField> fs) {
+        for (final ZipExtraField f : fs) {
             if (headerId.equals(f.getHeaderId())) {
                 return f;
             }
@@ -857,7 +857,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
         return this.localHeaderOffset;
     }
 
-    protected void setLocalHeaderOffset(long localHeaderOffset) {
+    protected void setLocalHeaderOffset(final long localHeaderOffset) {
         this.localHeaderOffset = localHeaderOffset;
     }
 
@@ -872,7 +872,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
      * @param dataOffset
      *      new value of data offset.
      */
-    protected void setDataOffset(long dataOffset) {
+    protected void setDataOffset(final long dataOffset) {
         this.dataOffset = dataOffset;
     }
 
@@ -881,7 +881,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
         return isStreamContiguous;
     }
 
-    protected void setStreamContiguous(boolean isStreamContiguous) {
+    protected void setStreamContiguous(final boolean isStreamContiguous) {
         this.isStreamContiguous = isStreamContiguous;
     }
 
@@ -948,7 +948,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
                         } else {
                             existing.parseFromCentralDirectoryData(b, 0, b.length);
                         }
-                    } catch (ZipException ex) {
+                    } catch (final ZipException ex) {
                         // emulate ExtraFieldParsingMode.fillAndMakeUnrecognizedOnError
                         final UnrecognizedExtraField u = new UnrecognizedExtraField();
                         u.setHeaderId(existing.getHeaderId());
@@ -1096,7 +1096,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
      * @param nameSource source of the name field value
      * @since 1.16
      */
-    public void setNameSource(NameSource nameSource) {
+    public void setNameSource(final NameSource nameSource) {
         this.nameSource = nameSource;
     }
 
@@ -1114,7 +1114,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
      * @param commentSource source of the comment field value
      * @since 1.16
      */
-    public void setCommentSource(CommentSource commentSource) {
+    public void setCommentSource(final CommentSource commentSource) {
         this.commentSource = commentSource;
     }
 
@@ -1134,7 +1134,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
      * @param diskNumberStart the number of the split segment this entry starts at.
      * @since 1.20
      */
-    public void setDiskNumberStart(long diskNumberStart) {
+    public void setDiskNumberStart(final long diskNumberStart) {
         this.diskNumberStart = diskNumberStart;
     }
 
@@ -1176,7 +1176,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
          */
         BEST_EFFORT(ExtraFieldUtils.UnparseableExtraField.READ) {
             @Override
-            public ZipExtraField fill(ZipExtraField field, byte[] data, int off, int len, boolean local) {
+            public ZipExtraField fill(final ZipExtraField field, final byte[] data, final int off, final int len, final boolean local) {
                 return fillAndMakeUnrecognizedOnError(field, data, off, len, local);
             }
         },
@@ -1205,7 +1205,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
          */
         ONLY_PARSEABLE_LENIENT(ExtraFieldUtils.UnparseableExtraField.SKIP) {
             @Override
-            public ZipExtraField fill(ZipExtraField field, byte[] data, int off, int len, boolean local) {
+            public ZipExtraField fill(final ZipExtraField field, final byte[] data, final int off, final int len, final boolean local) {
                 return fillAndMakeUnrecognizedOnError(field, data, off, len, local);
             }
         },
@@ -1229,13 +1229,13 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
 
         private final ExtraFieldUtils.UnparseableExtraField onUnparseableData;
 
-        private ExtraFieldParsingMode(ExtraFieldUtils.UnparseableExtraField onUnparseableData) {
+        private ExtraFieldParsingMode(final ExtraFieldUtils.UnparseableExtraField onUnparseableData) {
             this.onUnparseableData = onUnparseableData;
         }
 
         @Override
-        public ZipExtraField onUnparseableExtraField(byte[] data, int off, int len, boolean local,
-            int claimedLength) throws ZipException {
+        public ZipExtraField onUnparseableExtraField(final byte[] data, final int off, final int len, final boolean local,
+            final int claimedLength) throws ZipException {
             return onUnparseableData.onUnparseableExtraField(data, off, len, local, claimedLength);
         }
 
@@ -1246,16 +1246,16 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
         }
 
         @Override
-        public ZipExtraField fill(ZipExtraField field, byte[] data, int off, int len, boolean local)
+        public ZipExtraField fill(final ZipExtraField field, final byte[] data, final int off, final int len, final boolean local)
             throws ZipException {
             return ExtraFieldUtils.fillExtraField(field, data, off, len, local);
         }
 
-        private static ZipExtraField fillAndMakeUnrecognizedOnError(ZipExtraField field, byte[] data, int off,
-            int len, boolean local) {
+        private static ZipExtraField fillAndMakeUnrecognizedOnError(final ZipExtraField field, final byte[] data, final int off,
+            final int len, final boolean local) {
             try {
                 return ExtraFieldUtils.fillExtraField(field, data, off, len, local);
-            } catch (ZipException ex) {
+            } catch (final ZipException ex) {
                 final UnrecognizedExtraField u = new UnrecognizedExtraField();
                 u.setHeaderId(field.getHeaderId());
                 if (local) {
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
index 8246689..a0ace8d 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
@@ -261,7 +261,7 @@ public class ZipArchiveInputStream extends ArchiveInputStream implements InputSt
             firstEntry = false;
         }
 
-        long currentHeaderOffset = getBytesRead();
+        final long currentHeaderOffset = getBytesRead();
         try {
             if (firstEntry) {
                 // split archives have a special signature before the
@@ -350,10 +350,10 @@ public class ZipArchiveInputStream extends ArchiveInputStream implements InputSt
         current.entry.setDataOffset(getBytesRead());
         current.entry.setStreamContiguous(true);
 
-        ZipMethod m = ZipMethod.getMethodByCode(current.entry.getMethod());
+        final ZipMethod m = ZipMethod.getMethodByCode(current.entry.getMethod());
         if (current.entry.getCompressedSize() != ArchiveEntry.SIZE_UNKNOWN) {
             if (ZipUtil.canHandleEntryData(current.entry) && m != ZipMethod.STORED && m != ZipMethod.DEFLATED) {
-                InputStream bis = new BoundedInputStream(in, current.entry.getCompressedSize());
+                final InputStream bis = new BoundedInputStream(in, current.entry.getCompressedSize());
                 switch (m) {
                 case UNSHRINKING:
                     current.in = new UnshrinkingInputStream(bis);
@@ -364,7 +364,7 @@ public class ZipArchiveInputStream extends ArchiveInputStream implements InputSt
                             current.entry.getGeneralPurposeBit().getSlidingDictionarySize(),
                             current.entry.getGeneralPurposeBit().getNumberOfShannonFanoTrees(),
                             bis);
-                    } catch (IllegalArgumentException ex) {
+                    } catch (final IllegalArgumentException ex) {
                         throw new IOException("bad IMPLODE data", ex);
                     }
                     break;
@@ -1061,7 +1061,7 @@ public class ZipArchiveInputStream extends ArchiveInputStream implements InputSt
         // data so it will be too short.
         if (entriesRead > 0) {
             realSkip((long) entriesRead * CFH_LEN - LFH_LEN);
-            boolean foundEocd = findEocdRecord();
+            final boolean foundEocd = findEocdRecord();
             if (foundEocd) {
                 realSkip((long) ZipFile.MIN_EOCD_SIZE - WORD /* signature */ - SHORT /* comment len */);
                 readFully(shortBuf);
@@ -1176,24 +1176,24 @@ public class ZipArchiveInputStream extends ArchiveInputStream implements InputSt
      *
      * @see <a href="https://source.android.com/security/apksigning/v2">https://source.android.com/security/apksigning/v2</a>
      */
-    private boolean isApkSigningBlock(byte[] suspectLocalFileHeader) throws IOException {
+    private boolean isApkSigningBlock(final byte[] suspectLocalFileHeader) throws IOException {
         // length of block excluding the size field itself
-        BigInteger len = ZipEightByteInteger.getValue(suspectLocalFileHeader);
+        final BigInteger len = ZipEightByteInteger.getValue(suspectLocalFileHeader);
         // LFH has already been read and all but the first eight bytes contain (part of) the APK signing block,
         // also subtract 16 bytes in order to position us at the magic string
         BigInteger toSkip = len.add(BigInteger.valueOf(DWORD - suspectLocalFileHeader.length
             - (long) APK_SIGNING_BLOCK_MAGIC.length));
-        byte[] magic = new byte[APK_SIGNING_BLOCK_MAGIC.length];
+        final byte[] magic = new byte[APK_SIGNING_BLOCK_MAGIC.length];
 
         try {
             if (toSkip.signum() < 0) {
                 // suspectLocalFileHeader contains the start of suspect magic string
-                int off = suspectLocalFileHeader.length + toSkip.intValue();
+                final int off = suspectLocalFileHeader.length + toSkip.intValue();
                 // length was shorter than magic length
                 if (off < DWORD) {
                     return false;
                 }
-                int bytesInBuffer = Math.abs(toSkip.intValue());
+                final int bytesInBuffer = Math.abs(toSkip.intValue());
                 System.arraycopy(suspectLocalFileHeader, off, magic, 0, Math.min(bytesInBuffer, magic.length));
                 if (bytesInBuffer < magic.length) {
                     readFully(magic, bytesInBuffer);
@@ -1206,7 +1206,7 @@ public class ZipArchiveInputStream extends ArchiveInputStream implements InputSt
                 realSkip(toSkip.longValue());
                 readFully(magic);
             }
-        } catch (EOFException ex) { //NOSONAR
+        } catch (final EOFException ex) { //NOSONAR
             // length was invalid
             return false;
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
index a926531..f4c775e 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
@@ -321,7 +321,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
      * @throws IOException on error
      * @since 1.21
      */
-    public ZipArchiveOutputStream(final Path file, OpenOption... options) throws IOException {
+    public ZipArchiveOutputStream(final Path file, final OpenOption... options) throws IOException {
         def = new Deflater(level, true);
         OutputStream o = null;
         SeekableByteChannel _channel = null;
@@ -386,7 +386,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
      * @throws IOException on error
      * @since 1.13
      */
-    public ZipArchiveOutputStream(SeekableByteChannel channel) throws IOException {
+    public ZipArchiveOutputStream(final SeekableByteChannel channel) throws IOException {
         this.channel = channel;
         def = new Deflater(level, true);
         streamCompressor = StreamCompressor.create(channel, def);
@@ -536,12 +536,12 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
             throw new IOException("This archive contains unclosed entries.");
         }
 
-        long cdOverallOffset = streamCompressor.getTotalBytesWritten();
+        final long cdOverallOffset = streamCompressor.getTotalBytesWritten();
         cdOffset = cdOverallOffset;
         if (isSplitZip) {
             // when creating a split zip, the offset should be
             // the offset to the corresponding segment disk
-            ZipSplitOutputStream zipSplitOutputStream = (ZipSplitOutputStream)this.out;
+            final ZipSplitOutputStream zipSplitOutputStream = (ZipSplitOutputStream)this.out;
             cdOffset = zipSplitOutputStream.getCurrentSplitSegmentBytesWritten();
             cdDiskNumberStart = zipSplitOutputStream.getCurrentSplitSegmentIndex();
         }
@@ -1135,7 +1135,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
         if (isSplitZip) {
             // when creating a split zip, the offset should be
             // the offset to the corresponding segment disk
-            ZipSplitOutputStream splitOutputStream = (ZipSplitOutputStream)this.out;
+            final ZipSplitOutputStream splitOutputStream = (ZipSplitOutputStream)this.out;
             ze.setDiskNumberStart(splitOutputStream.getCurrentSplitSegmentIndex());
             localHeaderStart = splitOutputStream.getCurrentSplitSegmentBytesWritten();
         }
@@ -1149,12 +1149,12 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
 
 
     private byte[] createLocalFileHeader(final ZipArchiveEntry ze, final ByteBuffer name, final boolean encodable,
-                                         final boolean phased, long archiveOffset) {
-        ZipExtraField oldEx = ze.getExtraField(ResourceAlignmentExtraField.ID);
+                                         final boolean phased, final long archiveOffset) {
+        final ZipExtraField oldEx = ze.getExtraField(ResourceAlignmentExtraField.ID);
         if (oldEx != null) {
             ze.removeExtraField(ResourceAlignmentExtraField.ID);
         }
-        ResourceAlignmentExtraField oldAlignmentEx =
+        final ResourceAlignmentExtraField oldAlignmentEx =
             oldEx instanceof ResourceAlignmentExtraField ? (ResourceAlignmentExtraField) oldEx : null;
 
         int alignment = ze.getAlignment();
@@ -1163,11 +1163,11 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
         }
 
         if (alignment > 1 || (oldAlignmentEx != null && !oldAlignmentEx.allowMethodChange())) {
-            int oldLength = LFH_FILENAME_OFFSET +
+            final int oldLength = LFH_FILENAME_OFFSET +
                             name.limit() - name.position() +
                             ze.getLocalFileDataExtra().length;
 
-            int padding = (int) ((-archiveOffset - oldLength - ZipExtraField.EXTRAFIELD_HEADER_SIZE
+            final int padding = (int) ((-archiveOffset - oldLength - ZipExtraField.EXTRAFIELD_HEADER_SIZE
                             - ResourceAlignmentExtraField.BASE_SIZE) &
                             (alignment - 1));
             ze.addExtraField(new ResourceAlignmentExtraField(alignment,
@@ -1343,11 +1343,11 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
         if(isSplitZip) {
             // calculate the disk number for every central file header,
             // this will be used in writing End Of Central Directory and Zip64 End Of Central Directory
-            int currentSplitSegment = ((ZipSplitOutputStream)this.out).getCurrentSplitSegmentIndex();
+            final int currentSplitSegment = ((ZipSplitOutputStream)this.out).getCurrentSplitSegmentIndex();
             if(numberOfCDInDiskData.get(currentSplitSegment) == null) {
                 numberOfCDInDiskData.put(currentSplitSegment, 1);
             } else {
-                int originalNumberOfCD = numberOfCDInDiskData.get(currentSplitSegment);
+                final int originalNumberOfCD = numberOfCDInDiskData.get(currentSplitSegment);
                 numberOfCDInDiskData.put(currentSplitSegment, originalNumberOfCD + 1);
             }
         }
@@ -1502,7 +1502,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
         final int numberOfEntries = entries.size();
 
         // total number of entries in the central directory on this disk
-        int numOfEntriesOnThisDisk = isSplitZip
+        final int numOfEntriesOnThisDisk = isSplitZip
             ? (numberOfCDInDiskData.get(numberOfThisDisk) == null ? 0 : numberOfCDInDiskData.get(numberOfThisDisk))
             : numberOfEntries;
         final byte[] numOfEntriesOnThisDiskData = ZipShort
@@ -1599,7 +1599,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
         if(isSplitZip) {
             // when creating a split zip, the offset of should be
             // the offset to the corresponding segment disk
-            ZipSplitOutputStream zipSplitOutputStream = (ZipSplitOutputStream)this.out;
+            final ZipSplitOutputStream zipSplitOutputStream = (ZipSplitOutputStream)this.out;
             offset = zipSplitOutputStream.getCurrentSplitSegmentBytesWritten();
             diskNumberStart = zipSplitOutputStream.getCurrentSplitSegmentIndex();
         }
@@ -1634,7 +1634,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
         writeOut(ZipLong.getBytes(cdDiskNumberStart));
 
         // total number of entries in the central directory on this disk
-        int numOfEntriesOnThisDisk = isSplitZip
+        final int numOfEntriesOnThisDisk = isSplitZip
             ? (numberOfCDInDiskData.get(numberOfThisDisk) == null ? 0 : numberOfCDInDiskData.get(numberOfThisDisk))
             : entries.size();
         final byte[] numOfEntriesOnThisDiskData = ZipEightByteInteger.getBytes(numOfEntriesOnThisDisk);
@@ -1692,7 +1692,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
         if(isSplitZip) {
             numberOfThisDisk = ((ZipSplitOutputStream)this.out).getCurrentSplitSegmentIndex();
         }
-        int numOfEntriesOnThisDisk = numberOfCDInDiskData.get(numberOfThisDisk) == null ? 0 : numberOfCDInDiskData.get(numberOfThisDisk);
+        final int numOfEntriesOnThisDisk = numberOfCDInDiskData.get(numberOfThisDisk) == null ? 0 : numberOfCDInDiskData.get(numberOfThisDisk);
         return numberOfThisDisk >= ZIP64_MAGIC_SHORT            /* number of this disk */
                 || cdDiskNumberStart >= ZIP64_MAGIC_SHORT       /* number of the disk with the start of the central directory */
                 || numOfEntriesOnThisDisk >= ZIP64_MAGIC_SHORT  /* total number of entries in the central directory on this disk */
@@ -1725,7 +1725,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
     }
 
 
-    private GeneralPurposeBit getGeneralPurposeBits(final boolean utfFallback, boolean usesDataDescriptor) {
+    private GeneralPurposeBit getGeneralPurposeBits(final boolean utfFallback, final boolean usesDataDescriptor) {
         final GeneralPurposeBit b = new GeneralPurposeBit();
         b.useUTF8ForNames(useUTF8Flag || utfFallback);
         if (usesDataDescriptor) {
@@ -1744,11 +1744,11 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
         return versionNeededToExtractMethod(zipMethod);
     }
 
-    private boolean usesDataDescriptor(final int zipMethod, boolean phased) {
+    private boolean usesDataDescriptor(final int zipMethod, final boolean phased) {
         return !phased && zipMethod == DEFLATED && channel == null;
     }
 
-    private int versionNeededToExtractMethod(int zipMethod) {
+    private int versionNeededToExtractMethod(final int zipMethod) {
         return zipMethod == DEFLATED ? DEFLATE_MIN_VERSION : INITIAL_VERSION;
     }
 
@@ -1790,7 +1790,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
      * @since 1.21
      */
     @Override
-    public ArchiveEntry createArchiveEntry(final Path inputPath, final String entryName, LinkOption... options)
+    public ArchiveEntry createArchiveEntry(final Path inputPath, final String entryName, final LinkOption... options)
         throws IOException {
         if (finished) {
             throw new IOException("Stream has already been finished");
@@ -1810,7 +1810,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
             entry.causedUseOfZip64 = !hasUsedZip64;
         }
         hasUsedZip64 = true;
-        ZipExtraField extra = ze.getExtraField(Zip64ExtendedInformationExtraField.HEADER_ID);
+        final ZipExtraField extra = ze.getExtraField(Zip64ExtendedInformationExtraField.HEADER_ID);
         Zip64ExtendedInformationExtraField z64 = extra instanceof Zip64ExtendedInformationExtraField
             ? (Zip64ExtendedInformationExtraField) extra : null;
         if (z64 == null) {
@@ -1961,7 +1961,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
     private static final class EntryMetaData {
         private final long offset;
         private final boolean usesDataDescriptor;
-        private EntryMetaData(long offset, boolean usesDataDescriptor) {
+        private EntryMetaData(final long offset, final boolean usesDataDescriptor) {
             this.offset = offset;
             this.usesDataDescriptor = usesDataDescriptor;
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java
index d7ebba0..d03369e 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java
@@ -56,10 +56,10 @@ public abstract class ZipEncodingHelper {
         if (name != null) {
             try {
                 cs = Charset.forName(name);
-            } catch (UnsupportedCharsetException e) { // NOSONAR we use the default encoding instead
+            } catch (final UnsupportedCharsetException e) { // NOSONAR we use the default encoding instead
             }
         }
-        boolean useReplacement = isUTF8(cs.name());
+        final boolean useReplacement = isUTF8(cs.name());
         return new NioZipEncoding(cs, useReplacement);
     }
 
@@ -84,7 +84,7 @@ public abstract class ZipEncodingHelper {
         return false;
     }
 
-    static ByteBuffer growBufferBy(ByteBuffer buffer, int increment) {
+    static ByteBuffer growBufferBy(final ByteBuffer buffer, final int increment) {
         buffer.limit(buffer.position());
         buffer.rewind();
 
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
index 40ae09c..30f7087 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
@@ -374,7 +374,7 @@ public class ZipFile implements Closeable {
             }
             fillNameMap();
             success = true;
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new IOException("Error on ZipFile " + archiveName, e);
         } finally {
             closed = !success;
@@ -580,7 +580,7 @@ public class ZipFile implements Closeable {
                 try {
                     return new ExplodingInputStream(ze.getGeneralPurposeBit().getSlidingDictionarySize(),
                             ze.getGeneralPurposeBit().getNumberOfShannonFanoTrees(), is);
-                } catch (IllegalArgumentException ex) {
+                } catch (final IllegalArgumentException ex) {
                     throw new IOException("bad IMPLODE data", ex);
                 }
             case DEFLATED:
@@ -1171,7 +1171,7 @@ public class ZipFile implements Closeable {
                     wordBbuf.rewind();
                     IOUtils.readFully(archive, wordBbuf);
                     wordBbuf.flip();
-                } catch (EOFException ex) { // NOSONAR
+                } catch (final EOFException ex) { // NOSONAR
                     break;
                 }
                 int curr = wordBbuf.get();
@@ -1201,8 +1201,8 @@ public class ZipFile implements Closeable {
      * skipping failed.
      */
     private void skipBytes(final int count) throws IOException {
-        long currentPosition = archive.position();
-        long newPosition = currentPosition + count;
+        final long currentPosition = archive.position();
+        final long newPosition = currentPosition + count;
         if (newPosition > archive.size()) {
             throw new EOFException();
         }
@@ -1238,7 +1238,7 @@ public class ZipFile implements Closeable {
             // entries is filled in populateFromCentralDirectory and
             // never modified
             final Entry ze = (Entry) zipArchiveEntry;
-            int[] lens = setDataOffset(ze);
+            final int[] lens = setDataOffset(ze);
             final int fileNameLen = lens[0];
             final int extraFieldLen = lens[1];
             skipBytes(fileNameLen);
@@ -1268,7 +1268,7 @@ public class ZipFile implements Closeable {
         }
     }
 
-    private int[] setDataOffset(ZipArchiveEntry ze) throws IOException {
+    private int[] setDataOffset(final ZipArchiveEntry ze) throws IOException {
         long offset = ze.getLocalHeaderOffset();
         if (isSplitZipArchive) {
             ((ZipSplitReadOnlySeekableByteChannel) archive)
@@ -1290,8 +1290,8 @@ public class ZipFile implements Closeable {
         return new int[] { fileNameLen, extraFieldLen };
     }
 
-    private long getDataOffset(ZipArchiveEntry ze) throws IOException {
-        long s = ze.getDataOffset();
+    private long getDataOffset(final ZipArchiveEntry ze) throws IOException {
+        final long s = ze.getDataOffset();
         if (s == EntryStreamOffsets.OFFSET_UNKNOWN) {
             setDataOffset(ze);
             return ze.getDataOffset();
@@ -1314,7 +1314,7 @@ public class ZipFile implements Closeable {
      * Creates new BoundedInputStream, according to implementation of
      * underlying archive channel.
      */
-    private BoundedInputStream createBoundedInputStream(long start, long remaining) {
+    private BoundedInputStream createBoundedInputStream(final long start, final long remaining) {
         return archive instanceof FileChannel ?
             new BoundedFileChannelInputStream(start, remaining) :
             new BoundedInputStream(start, remaining);
@@ -1350,7 +1350,7 @@ public class ZipFile implements Closeable {
             else {
                 singleByteBuffer.rewind();
             }
-            int read = read(loc, singleByteBuffer);
+            final int read = read(loc, singleByteBuffer);
             if (read < 0) {
                 return read;
             }
@@ -1373,7 +1373,7 @@ public class ZipFile implements Closeable {
 
             ByteBuffer buf;
             buf = ByteBuffer.wrap(b, off, len);
-            int ret = read(loc, buf);
+            final int ret = read(loc, buf);
             if (ret > 0) {
                 loc += ret;
                 return ret;
@@ -1381,7 +1381,7 @@ public class ZipFile implements Closeable {
             return ret;
         }
 
-        protected int read(long pos, ByteBuffer buf) throws IOException {
+        protected int read(final long pos, final ByteBuffer buf) throws IOException {
             int read;
             synchronized (archive) {
                 archive.position(pos);
@@ -1407,8 +1407,8 @@ public class ZipFile implements Closeable {
         }
 
         @Override
-        protected int read(long pos, ByteBuffer buf) throws IOException {
-            int read = archive.read(buf, pos);
+        protected int read(final long pos, final ByteBuffer buf) throws IOException {
+            final int read = archive.read(buf, pos);
             buf.flip();
             return read;
         }
@@ -1490,7 +1490,7 @@ public class ZipFile implements Closeable {
     }
 
     private static class StoredStatisticsStream extends CountingInputStream implements InputStreamStatistics {
-        StoredStatisticsStream(InputStream in) {
+        StoredStatisticsStream(final InputStream in) {
             super(in);
         }
 
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipLong.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipLong.java
index 7b6d978..cab0ecb 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipLong.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipLong.java
@@ -86,7 +86,7 @@ public final class ZipLong implements Cloneable, Serializable {
      * @param value the int to store as a ZipLong
      * @since 1.15
      */
-    public ZipLong(int value) {
+    public ZipLong(final int value) {
         this.value = value;
     }
 
@@ -150,7 +150,7 @@ public final class ZipLong implements Cloneable, Serializable {
      *         must be non-negative and no larger than {@code buf.length-4}
      */
 
-    public static void putLong(final long value, final byte[] buf, int offset) {
+    public static void putLong(final long value, final byte[] buf, final int offset) {
         ByteUtils.toLittleEndian(buf, value, offset, 4);
     }
 
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStream.java
index 7f62646..499c213 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStream.java
@@ -81,25 +81,25 @@ class ZipSplitOutputStream extends OutputStream {
      * @throws IllegalArgumentException
      * @throws IOException
      */
-    public void prepareToWriteUnsplittableContent(long unsplittableContentSize) throws IllegalArgumentException, IOException {
+    public void prepareToWriteUnsplittableContent(final long unsplittableContentSize) throws IllegalArgumentException, IOException {
         if (unsplittableContentSize > this.splitSize) {
             throw new IllegalArgumentException("The unsplittable content size is bigger than the split segment size");
         }
 
-        long bytesRemainingInThisSegment = this.splitSize - this.currentSplitSegmentBytesWritten;
+        final long bytesRemainingInThisSegment = this.splitSize - this.currentSplitSegmentBytesWritten;
         if (bytesRemainingInThisSegment < unsplittableContentSize) {
             openNewSplitSegment();
         }
     }
 
     @Override
-    public void write(int i) throws IOException {
+    public void write(final int i) throws IOException {
         singleByte[0] = (byte)(i & 0xff);
         write(singleByte);
     }
 
     @Override
-    public void write(byte[] b) throws IOException {
+    public void write(final byte[] b) throws IOException {
         write(b, 0, b.length);
     }
 
@@ -113,7 +113,7 @@ class ZipSplitOutputStream extends OutputStream {
      * @throws IOException
      */
     @Override
-    public void write(byte[] b, int off, int len) throws IOException {
+    public void write(final byte[] b, final int off, final int len) throws IOException {
         if (len <= 0) {
             return;
         }
@@ -122,7 +122,7 @@ class ZipSplitOutputStream extends OutputStream {
             openNewSplitSegment();
             write(b, off, len);
         } else if (currentSplitSegmentBytesWritten + len > splitSize) {
-            int bytesToWriteForThisSegment = (int) splitSize - (int) currentSplitSegmentBytesWritten;
+            final int bytesToWriteForThisSegment = (int) splitSize - (int) currentSplitSegmentBytesWritten;
             write(b, off, bytesToWriteForThisSegment);
             openNewSplitSegment();
             write(b, off + bytesToWriteForThisSegment, len - bytesToWriteForThisSegment);
@@ -149,8 +149,8 @@ class ZipSplitOutputStream extends OutputStream {
             throw new IOException("This archive has already been finished");
         }
 
-        String zipFileBaseName = FileNameUtils.getBaseName(zipFile.getName());
-        File lastZipSplitSegmentFile = new File(zipFile.getParentFile(), zipFileBaseName + ".zip");
+        final String zipFileBaseName = FileNameUtils.getBaseName(zipFile.getName());
+        final File lastZipSplitSegmentFile = new File(zipFile.getParentFile(), zipFileBaseName + ".zip");
         outputStream.close();
         if (!zipFile.renameTo(lastZipSplitSegmentFile)) {
             throw new IOException("Failed to rename " + zipFile + " to " + lastZipSplitSegmentFile);
@@ -217,9 +217,9 @@ class ZipSplitOutputStream extends OutputStream {
      * @return
      * @throws IOException
      */
-    private File createNewSplitSegmentFile(Integer zipSplitSegmentSuffixIndex) throws IOException {
-        int newZipSplitSegmentSuffixIndex = zipSplitSegmentSuffixIndex == null ? (currentSplitSegmentIndex + 2) : zipSplitSegmentSuffixIndex;
-        String baseName = FileNameUtils.getBaseName(zipFile.getName());
+    private File createNewSplitSegmentFile(final Integer zipSplitSegmentSuffixIndex) throws IOException {
+        final int newZipSplitSegmentSuffixIndex = zipSplitSegmentSuffixIndex == null ? (currentSplitSegmentIndex + 2) : zipSplitSegmentSuffixIndex;
+        final String baseName = FileNameUtils.getBaseName(zipFile.getName());
         String extension = ".z";
         if (newZipSplitSegmentSuffixIndex <= 9) {
             extension += "0" + newZipSplitSegmentSuffixIndex;
@@ -227,7 +227,7 @@ class ZipSplitOutputStream extends OutputStream {
             extension += newZipSplitSegmentSuffixIndex;
         }
 
-        File newFile = new File(zipFile.getParent(), baseName + extension);
+        final File newFile = new File(zipFile.getParent(), baseName + extension);
 
         if (newFile.exists()) {
             throw new IOException("split zip segment " + baseName + extension + " already exists");
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitReadOnlySeekableByteChannel.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitReadOnlySeekableByteChannel.java
index d8256b4..7c98584 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitReadOnlySeekableByteChannel.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitReadOnlySeekableByteChannel.java
@@ -62,7 +62,7 @@ public class ZipSplitReadOnlySeekableByteChannel extends MultiReadOnlySeekableBy
      * @throws IOException if the first channel doesn't seem to hold
      * the beginning of a split archive
      */
-    public ZipSplitReadOnlySeekableByteChannel(List<SeekableByteChannel> channels)
+    public ZipSplitReadOnlySeekableByteChannel(final List<SeekableByteChannel> channels)
         throws IOException {
         super(channels);
 
@@ -90,7 +90,7 @@ public class ZipSplitReadOnlySeekableByteChannel extends MultiReadOnlySeekableBy
      */
     private void assertSplitSignature(final List<SeekableByteChannel> channels)
         throws IOException {
-        SeekableByteChannel channel = channels.get(0);
+        final SeekableByteChannel channel = channels.get(0);
         // the zip split file signature is at the beginning of the first split segment
         channel.position(0L);
 
@@ -114,7 +114,7 @@ public class ZipSplitReadOnlySeekableByteChannel extends MultiReadOnlySeekableBy
      * @throws NullPointerException if channels is null
      * @throws IOException if reading channels fails
      */
-    public static SeekableByteChannel forOrderedSeekableByteChannels(SeekableByteChannel... channels) throws IOException {
+    public static SeekableByteChannel forOrderedSeekableByteChannels(final SeekableByteChannel... channels) throws IOException {
         if (Objects.requireNonNull(channels, "channels must not be null").length == 1) {
             return channels[0];
         }
@@ -132,18 +132,18 @@ public class ZipSplitReadOnlySeekableByteChannel extends MultiReadOnlySeekableBy
      * @throws IOException if the first channel doesn't seem to hold
      * the beginning of a split archive
      */
-    public static SeekableByteChannel forOrderedSeekableByteChannels(SeekableByteChannel lastSegmentChannel,
-        Iterable<SeekableByteChannel> channels) throws IOException {
+    public static SeekableByteChannel forOrderedSeekableByteChannels(final SeekableByteChannel lastSegmentChannel,
+        final Iterable<SeekableByteChannel> channels) throws IOException {
         Objects.requireNonNull(channels, "channels");
         Objects.requireNonNull(lastSegmentChannel, "lastSegmentChannel");
 
-        List<SeekableByteChannel> channelsList = new ArrayList<>();
-        for (SeekableByteChannel channel : channels) {
+        final List<SeekableByteChannel> channelsList = new ArrayList<>();
+        for (final SeekableByteChannel channel : channels) {
             channelsList.add(channel);
         }
         channelsList.add(lastSegmentChannel);
 
-        SeekableByteChannel[] channelArray = new SeekableByteChannel[channelsList.size()];
+        final SeekableByteChannel[] channelArray = new SeekableByteChannel[channelsList.size()];
         return forOrderedSeekableByteChannels(channelsList.toArray(channelArray));
     }
 
@@ -156,21 +156,21 @@ public class ZipSplitReadOnlySeekableByteChannel extends MultiReadOnlySeekableBy
      * @throws IOException if the first channel doesn't seem to hold
      * the beginning of a split archive
      */
-    public static SeekableByteChannel buildFromLastSplitSegment(File lastSegmentFile) throws IOException {
-        String extension = FileNameUtils.getExtension(lastSegmentFile.getCanonicalPath());
+    public static SeekableByteChannel buildFromLastSplitSegment(final File lastSegmentFile) throws IOException {
+        final String extension = FileNameUtils.getExtension(lastSegmentFile.getCanonicalPath());
         if (!extension.equalsIgnoreCase(ArchiveStreamFactory.ZIP)) {
             throw new IllegalArgumentException("The extension of last zip split segment should be .zip");
         }
 
-        File parent = lastSegmentFile.getParentFile();
-        String fileBaseName = FileNameUtils.getBaseName(lastSegmentFile.getCanonicalPath());
-        ArrayList<File> splitZipSegments = new ArrayList<>();
+        final File parent = lastSegmentFile.getParentFile();
+        final String fileBaseName = FileNameUtils.getBaseName(lastSegmentFile.getCanonicalPath());
+        final ArrayList<File> splitZipSegments = new ArrayList<>();
 
         // zip split segments should be like z01,z02....z(n-1) based on the zip specification
-        Pattern pattern = Pattern.compile(Pattern.quote(fileBaseName) + ".[zZ][0-9]+");
+        final Pattern pattern = Pattern.compile(Pattern.quote(fileBaseName) + ".[zZ][0-9]+");
         final File[] children = parent.listFiles();
         if (children != null) {
-            for (File file : children) {
+            for (final File file : children) {
                 if (!pattern.matcher(file.getName()).matches()) {
                     continue;
                 }
@@ -194,9 +194,9 @@ public class ZipSplitReadOnlySeekableByteChannel extends MultiReadOnlySeekableBy
      * @throws IOException if the first channel doesn't seem to hold
      * the beginning of a split archive
      */
-    public static SeekableByteChannel forFiles(File... files) throws IOException {
-        List<SeekableByteChannel> channels = new ArrayList<>();
-        for (File f : Objects.requireNonNull(files, "files must not be null")) {
+    public static SeekableByteChannel forFiles(final File... files) throws IOException {
+        final List<SeekableByteChannel> channels = new ArrayList<>();
+        for (final File f : Objects.requireNonNull(files, "files must not be null")) {
             channels.add(Files.newByteChannel(f.toPath(), StandardOpenOption.READ));
         }
         if (channels.size() == 1) {
@@ -216,26 +216,26 @@ public class ZipSplitReadOnlySeekableByteChannel extends MultiReadOnlySeekableBy
      * the beginning of a split archive
      * @throws NullPointerException if files or lastSegmentFile is null
      */
-    public static SeekableByteChannel forFiles(File lastSegmentFile, Iterable<File> files) throws IOException {
+    public static SeekableByteChannel forFiles(final File lastSegmentFile, final Iterable<File> files) throws IOException {
         Objects.requireNonNull(files, "files");
         Objects.requireNonNull(lastSegmentFile, "lastSegmentFile");
 
-        List<File> filesList = new ArrayList<>();
-        for (File f : files) {
+        final List<File> filesList = new ArrayList<>();
+        for (final File f : files) {
             filesList.add(f);
         }
         filesList.add(lastSegmentFile);
 
-        File[] filesArray = new File[filesList.size()];
+        final File[] filesArray = new File[filesList.size()];
         return forFiles(filesList.toArray(filesArray));
     }
 
     private static class ZipSplitSegmentComparator implements Comparator<File>, Serializable {
         private static final long serialVersionUID = 20200123L;
         @Override
-        public int compare(File file1, File file2) {
-            String extension1 = FileNameUtils.getExtension(file1.getPath());
-            String extension2 = FileNameUtils.getExtension(file2.getPath());
+        public int compare(final File file1, final File file2) {
+            final String extension1 = FileNameUtils.getExtension(file1.getPath());
+            final String extension2 = FileNameUtils.getExtension(file2.getPath());
 
             if (!extension1.startsWith("z")) {
                 return -1;
@@ -245,8 +245,8 @@ public class ZipSplitReadOnlySeekableByteChannel extends MultiReadOnlySeekableBy
                 return 1;
             }
 
-            Integer splitSegmentNumber1 = Integer.parseInt(extension1.substring(1));
-            Integer splitSegmentNumber2 = Integer.parseInt(extension2.substring(1));
+            final Integer splitSegmentNumber1 = Integer.parseInt(extension1.substring(1));
+            final Integer splitSegmentNumber2 = Integer.parseInt(extension2.substring(1));
 
             return splitSegmentNumber1.compareTo(splitSegmentNumber2);
         }
diff --git a/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java b/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
index 5b52839..463089c 100644
--- a/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
+++ b/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
@@ -213,7 +213,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider {
     private static final String YOU_NEED_XZ_JAVA = youNeed("XZ for Java", "https://tukaani.org/xz/java.html");
     private static final String YOU_NEED_ZSTD_JNI = youNeed("Zstd JNI", "https://github.com/luben/zstd-jni");
 
-    private static String youNeed(String name, String url) {
+    private static String youNeed(final String name, final String url) {
         return " In addition to Apache Commons Compress you need the " + name + " library - see " + url;
     }
 
@@ -478,7 +478,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider {
         try {
             signatureLength = IOUtils.readFully(inputStream, signature);
             inputStream.reset();
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new CompressorException("IOException while reading signature.", e);
         }
 
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 be780e9..437bef8 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
@@ -236,8 +236,8 @@ public class BZip2CompressorInputStream extends CompressorInputStream
         }
     }
 
-    private int readNextByte(BitInputStream in) throws IOException {
-        long b = in.readBits(8);
+    private int readNextByte(final BitInputStream in) throws IOException {
+        final long b = in.readBits(8);
         return (int) b;
     }
 
@@ -276,7 +276,7 @@ public class BZip2CompressorInputStream extends CompressorInputStream
     }
 
     private void initBlock() throws IOException {
-        BitInputStream bin = this.bin;
+        final BitInputStream bin = this.bin;
         char magic0;
         char magic1;
         char magic2;
@@ -387,27 +387,27 @@ public class BZip2CompressorInputStream extends CompressorInputStream
      * @return the requested bits combined into an int
      * @throws IOException
      */
-    private static int bsR(BitInputStream bin, final int n) throws IOException {
-        long thech = bin.readBits(n);
+    private static int bsR(final BitInputStream bin, final int n) throws IOException {
+        final long thech = bin.readBits(n);
         if (thech < 0) {
             throw new IOException("Unexpected end of stream");
         }
         return (int) thech;
     }
 
-    private static boolean bsGetBit(BitInputStream bin) throws IOException {
+    private static boolean bsGetBit(final BitInputStream bin) throws IOException {
         return bsR(bin, 1) != 0;
     }
 
-    private static char bsGetUByte(BitInputStream bin) throws IOException {
+    private static char bsGetUByte(final BitInputStream bin) throws IOException {
         return (char) bsR(bin, 8);
     }
 
-    private static int bsGetInt(BitInputStream bin) throws IOException {
+    private static int bsGetInt(final BitInputStream bin) throws IOException {
         return bsR(bin, 32);
     }
 
-    private static void checkBounds(final int checkVal, final int limitExclusive, String name)
+    private static void checkBounds(final int checkVal, final int limitExclusive, final String name)
         throws IOException {
         if (checkVal < 0) {
             throw new IOException("Corrupted input, " + name + " value negative");
diff --git a/src/main/java/org/apache/commons/compress/compressors/deflate64/Deflate64CompressorInputStream.java b/src/main/java/org/apache/commons/compress/compressors/deflate64/Deflate64CompressorInputStream.java
index c701d5b..db7e5e9 100644
--- a/src/main/java/org/apache/commons/compress/compressors/deflate64/Deflate64CompressorInputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/deflate64/Deflate64CompressorInputStream.java
@@ -42,12 +42,12 @@ public class Deflate64CompressorInputStream extends CompressorInputStream implem
      *
      * @param in the stream to read from
      */
-    public Deflate64CompressorInputStream(InputStream in) {
+    public Deflate64CompressorInputStream(final InputStream in) {
         this(new HuffmanDecoder(in));
         originalStream = in;
     }
 
-    Deflate64CompressorInputStream(HuffmanDecoder decoder) {
+    Deflate64CompressorInputStream(final HuffmanDecoder decoder) {
         this.decoder = decoder;
     }
 
@@ -57,7 +57,7 @@ public class Deflate64CompressorInputStream extends CompressorInputStream implem
     @Override
     public int read() throws IOException {
         while (true) {
-            int r = read(oneByte);
+            final int r = read(oneByte);
             switch (r) {
                 case 1:
                     return oneByte[0] & 0xFF;
@@ -75,7 +75,7 @@ public class Deflate64CompressorInputStream extends CompressorInputStream implem
      * @throws java.io.EOFException if the underlying stream is exhausted before the end of deflated data was reached.
      */
     @Override
-    public int read(byte[] b, int off, int len) throws IOException {
+    public int read(final byte[] b, final int off, final int len) throws IOException {
         if (len == 0) {
             return 0;
         }
@@ -83,7 +83,7 @@ public class Deflate64CompressorInputStream extends CompressorInputStream implem
         if (decoder != null) {
             try {
                 read = decoder.decode(b, off, len);
-            } catch (RuntimeException ex) {
+            } catch (final RuntimeException ex) {
                 throw new IOException("Invalid Deflate64 input", ex);
             }
             compressedBytesRead = decoder.getBytesRead();
diff --git a/src/main/java/org/apache/commons/compress/compressors/deflate64/HuffmanDecoder.java b/src/main/java/org/apache/commons/compress/compressors/deflate64/HuffmanDecoder.java
index 8517a20..792d560 100644
--- a/src/main/java/org/apache/commons/compress/compressors/deflate64/HuffmanDecoder.java
+++ b/src/main/java/org/apache/commons/compress/compressors/deflate64/HuffmanDecoder.java
@@ -113,7 +113,7 @@ class HuffmanDecoder implements Closeable {
 
     private final DecodingMemory memory = new DecodingMemory();
 
-    HuffmanDecoder(InputStream in) {
+    HuffmanDecoder(final InputStream in) {
         this.reader = new BitInputStream(in, ByteOrder.LITTLE_ENDIAN);
         this.in = in;
         state = new InitialState();
@@ -125,15 +125,15 @@ class HuffmanDecoder implements Closeable {
         reader = null;
     }
 
-    public int decode(byte[] b) throws IOException {
+    public int decode(final byte[] b) throws IOException {
         return decode(b, 0, b.length);
     }
 
-    public int decode(byte[] b, int off, int len) throws IOException {
+    public int decode(final byte[] b, final int off, final int len) throws IOException {
         while (!finalBlock || state.hasData()) {
             if (state.state() == INITIAL) {
                 finalBlock = readBits(1) == 1;
-                int mode = (int) readBits(2);
+                final int mode = (int) readBits(2);
                 switch (mode) {
                 case 0:
                     switchToUncompressedState();
@@ -142,14 +142,14 @@ class HuffmanDecoder implements Closeable {
                     state = new HuffmanCodes(FIXED_CODES, FIXED_LITERALS, FIXED_DISTANCE);
                     break;
                 case 2:
-                    int[][] tables = readDynamicTables();
+                    final int[][] tables = readDynamicTables();
                     state = new HuffmanCodes(DYNAMIC_CODES, tables[0], tables[1]);
                     break;
                 default:
                     throw new IllegalStateException("Unsupported compression: " + mode);
                 }
             } else {
-                int r = state.read(b, off, len);
+                final int r = state.read(b, off, len);
                 if (r != 0) {
                     return r;
                 }
@@ -167,8 +167,8 @@ class HuffmanDecoder implements Closeable {
 
     private void switchToUncompressedState() throws IOException {
         reader.alignWithByteBoundary();
-        long bLen = readBits(16);
-        long bNLen = readBits(16);
+        final long bLen = readBits(16);
+        final long bNLen = readBits(16);
         if (((bLen ^ 0xFFFF) & 0xFFFF) != bNLen) {
             //noinspection DuplicateStringLiteralInspection
             throw new IllegalStateException("Illegal LEN / NLEN values");
@@ -177,11 +177,11 @@ class HuffmanDecoder implements Closeable {
     }
 
     private int[][] readDynamicTables() throws IOException {
-        int[][] result = new int[2][];
-        int literals = (int) (readBits(5) + 257);
+        final int[][] result = new int[2][];
+        final int literals = (int) (readBits(5) + 257);
         result[0] = new int[literals];
 
-        int distances = (int) (readBits(5) + 1);
+        final int distances = (int) (readBits(5) + 1);
         result[1] = new int[distances];
 
         populateDynamicTables(reader, result[0], result[1]);
@@ -206,7 +206,7 @@ class HuffmanDecoder implements Closeable {
         private final long blockLength;
         private long read;
 
-        private UncompressedState(long blockLength) {
+        private UncompressedState(final long blockLength) {
             this.blockLength = blockLength;
         }
 
@@ -216,17 +216,17 @@ class HuffmanDecoder implements Closeable {
         }
 
         @Override
-        int read(byte[] b, int off, int len) throws IOException {
+        int read(final byte[] b, final int off, final int len) throws IOException {
             if (len == 0) {
                 return 0;
             }
             // as len is an int and (blockLength - read) is >= 0 the min must fit into an int as well
-            int max = (int) Math.min(blockLength - read, len);
+            final int max = (int) Math.min(blockLength - read, len);
             int readSoFar = 0;
             while (readSoFar < max) {
                 int readNow;
                 if (reader.bitsCached() > 0) {
-                    byte next = (byte) readBits(Byte.SIZE);
+                    final byte next = (byte) readBits(Byte.SIZE);
                     b[off + readSoFar] = memory.add(next);
                     readNow = 1;
                 } else {
@@ -260,7 +260,7 @@ class HuffmanDecoder implements Closeable {
         }
 
         @Override
-        int read(byte[] b, int off, int len) throws IOException {
+        int read(final byte[] b, final int off, final int len) throws IOException {
             if (len == 0) {
                 return 0;
             }
@@ -288,7 +288,7 @@ class HuffmanDecoder implements Closeable {
         private byte[] runBuffer = new byte[0];
         private int runBufferLength = 0;
 
-        HuffmanCodes(HuffmanState state, int[] lengths, int[] distance) {
+        HuffmanCodes(final HuffmanState state, final int[] lengths, final int[] distance) {
             this.state = state;
             lengthTree = buildTree(lengths);
             distanceTree = buildTree(distance);
@@ -300,34 +300,34 @@ class HuffmanDecoder implements Closeable {
         }
 
         @Override
-        int read(byte[] b, int off, int len) throws IOException {
+        int read(final byte[] b, final int off, final int len) throws IOException {
             if (len == 0) {
                 return 0;
             }
             return decodeNext(b, off, len);
         }
 
-        private int decodeNext(byte[] b, int off, int len) throws IOException {
+        private int decodeNext(final byte[] b, final int off, final int len) throws IOException {
             if (endOfBlock) {
                 return -1;
             }
             int result = copyFromRunBuffer(b, off, len);
 
             while (result < len) {
-                int symbol = nextSymbol(reader, lengthTree);
+                final int symbol = nextSymbol(reader, lengthTree);
                 if (symbol < 256) {
                     b[off + result++] = memory.add((byte) symbol);
                 } else if (symbol > 256) {
-                    int runMask = RUN_LENGTH_TABLE[symbol - 257];
+                    final int runMask = RUN_LENGTH_TABLE[symbol - 257];
                     int run = runMask >>> 5;
-                    int runXtra = runMask & 0x1F;
+                    final int runXtra = runMask & 0x1F;
                     run += readBits(runXtra);
 
-                    int distSym = nextSymbol(reader, distanceTree);
+                    final int distSym = nextSymbol(reader, distanceTree);
 
-                    int distMask = DISTANCE_TABLE[distSym];
+                    final int distMask = DISTANCE_TABLE[distSym];
                     int dist = distMask >>> 4;
-                    int distXtra = distMask & 0xF;
+                    final int distXtra = distMask & 0xF;
                     dist += readBits(distXtra);
 
                     if (runBuffer.length < run) {
@@ -347,8 +347,8 @@ class HuffmanDecoder implements Closeable {
             return result;
         }
 
-        private int copyFromRunBuffer(byte[] b, int off, int len) {
-            int bytesInBuffer = runBufferLength - runBufferPos;
+        private int copyFromRunBuffer(final byte[] b, final int off, final int len) {
+            final int bytesInBuffer = runBufferLength - runBufferPos;
             int copiedBytes = 0;
             if (bytesInBuffer > 0) {
                 copiedBytes = Math.min(len, bytesInBuffer);
@@ -369,24 +369,24 @@ class HuffmanDecoder implements Closeable {
         }
     }
 
-    private static int nextSymbol(BitInputStream reader, BinaryTreeNode tree) throws IOException {
+    private static int nextSymbol(final BitInputStream reader, final BinaryTreeNode tree) throws IOException {
         BinaryTreeNode node = tree;
         while (node != null && node.literal == -1) {
-            long bit = readBits(reader, 1);
+            final long bit = readBits(reader, 1);
             node = bit == 0 ? node.leftNode : node.rightNode;
         }
         return node != null ? node.literal : -1;
     }
 
-    private static void populateDynamicTables(BitInputStream reader, int[] literals, int[] distances) throws IOException {
-        int codeLengths = (int) (readBits(reader, 4) + 4);
+    private static void populateDynamicTables(final BitInputStream reader, final int[] literals, final int[] distances) throws IOException {
+        final int codeLengths = (int) (readBits(reader, 4) + 4);
 
-        int[] codeLengthValues = new int[19];
+        final int[] codeLengthValues = new int[19];
         for (int cLen = 0; cLen < codeLengths; cLen++) {
             codeLengthValues[CODE_LENGTHS_ORDER[cLen]] = (int) readBits(reader, 3);
         }
 
-        BinaryTreeNode codeLengthTree = buildTree(codeLengthValues);
+        final BinaryTreeNode codeLengthTree = buildTree(codeLengthValues);
 
         final int[] auxBuffer = new int[literals.length + distances.length];
 
@@ -398,7 +398,7 @@ class HuffmanDecoder implements Closeable {
                 auxBuffer[off++] = value;
                 length--;
             } else {
-                int symbol = nextSymbol(reader, codeLengthTree);
+                final int symbol = nextSymbol(reader, codeLengthTree);
                 if (symbol < 16) {
                     value = symbol;
                     auxBuffer[off++] = value;
@@ -424,11 +424,11 @@ class HuffmanDecoder implements Closeable {
         BinaryTreeNode leftNode;
         BinaryTreeNode rightNode;
 
-        private BinaryTreeNode(int bits) {
+        private BinaryTreeNode(final int bits) {
             this.bits = bits;
         }
 
-        void leaf(int symbol) {
+        void leaf(final int symbol) {
             literal = symbol;
             leftNode = null;
             rightNode = null;
@@ -449,18 +449,18 @@ class HuffmanDecoder implements Closeable {
         }
     }
 
-    private static BinaryTreeNode buildTree(int[] litTable) {
-        int[] literalCodes = getCodes(litTable);
+    private static BinaryTreeNode buildTree(final int[] litTable) {
+        final int[] literalCodes = getCodes(litTable);
 
-        BinaryTreeNode root = new BinaryTreeNode(0);
+        final BinaryTreeNode root = new BinaryTreeNode(0);
 
         for (int i = 0; i < litTable.length; i++) {
-            int len = litTable[i];
+            final int len = litTable[i];
             if (len != 0) {
                 BinaryTreeNode node = root;
-                int lit = literalCodes[len - 1];
+                final int lit = literalCodes[len - 1];
                 for (int p = len - 1; p >= 0; p--) {
-                    int bit = lit & (1 << p);
+                    final int bit = lit & (1 << p);
                     node = bit == 0 ? node.left() : node.right();
                     if (node == null) {
                         throw new IllegalStateException("node doesn't exist in Huffman tree");
@@ -473,11 +473,11 @@ class HuffmanDecoder implements Closeable {
         return root;
     }
 
-    private static int[] getCodes(int[] litTable) {
+    private static int[] getCodes(final int[] litTable) {
         int max = 0;
         int[] blCount = new int[65];
 
-        for (int aLitTable : litTable) {
+        for (final int aLitTable : litTable) {
             if (aLitTable < 0 || aLitTable > 64) {
                 throw new IllegalArgumentException("Invalid code " + aLitTable
                     + " in literal table");
@@ -488,7 +488,7 @@ class HuffmanDecoder implements Closeable {
         blCount = Arrays.copyOf(blCount, max + 1);
 
         int code = 0;
-        int[] nextCode = new int[max + 1];
+        final int[] nextCode = new int[max + 1];
         for (int i = 0; i <= max; i++) {
             code = (code + blCount[i]) << 1;
             nextCode[i] = code;
@@ -507,28 +507,28 @@ class HuffmanDecoder implements Closeable {
             this(16);
         }
 
-        private DecodingMemory(int bits) {
+        private DecodingMemory(final int bits) {
             memory = new byte[1 << bits];
             mask = memory.length - 1;
         }
 
-        byte add(byte b) {
+        byte add(final byte b) {
             memory[wHead] = b;
             wHead = incCounter(wHead);
             return b;
         }
 
-        void add(byte[] b, int off, int len) {
+        void add(final byte[] b, final int off, final int len) {
             for (int i = off; i < off + len; i++) {
                 add(b[i]);
             }
         }
 
-        void recordToBuffer(int distance, int length, byte[] buff) {
+        void recordToBuffer(final int distance, final int length, final byte[] buff) {
             if (distance > memory.length) {
                 throw new IllegalStateException("Illegal distance parameter: " + distance);
             }
-            int start = (wHead - distance) & mask;
+            final int start = (wHead - distance) & mask;
             if (!wrappedAround && start >= wHead) {
                 throw new IllegalStateException("Attempt to read beyond memory: dist=" + distance);
             }
@@ -537,7 +537,7 @@ class HuffmanDecoder implements Closeable {
             }
         }
 
-        private int incCounter(int counter) {
+        private int incCounter(final int counter) {
             final int newCounter = (counter + 1) & mask;
             if (!wrappedAround && newCounter < counter) {
                 wrappedAround = true;
@@ -546,12 +546,12 @@ class HuffmanDecoder implements Closeable {
         }
     }
 
-    private long readBits(int numBits) throws IOException {
+    private long readBits(final int numBits) throws IOException {
         return readBits(reader, numBits);
     }
 
-    private static long readBits(BitInputStream reader, int numBits) throws IOException {
-        long r = reader.readBits(numBits);
+    private static long readBits(final BitInputStream reader, final int numBits) throws IOException {
+        final long r = reader.readBits(numBits);
         if (r == -1) {
             throw new EOFException("Truncated Deflate64 Stream");
         }
diff --git a/src/main/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorInputStream.java b/src/main/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorInputStream.java
index 70fcb9d..94bd157 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorInputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorInputStream.java
@@ -71,7 +71,7 @@ public class BlockLZ4CompressorInputStream extends AbstractLZ77CompressorInputSt
             readSizes();
             /*FALLTHROUGH*/
         case IN_LITERAL:
-            int litLen = readLiteral(b, off, len);
+            final int litLen = readLiteral(b, off, len);
             if (!hasMoreDataInBlock()) {
                 state = State.LOOKING_FOR_BACK_REFERENCE;
             }
@@ -83,7 +83,7 @@ public class BlockLZ4CompressorInputStream extends AbstractLZ77CompressorInputSt
             }
             /*FALLTHROUGH*/
         case IN_BACK_REFERENCE:
-            int backReferenceLen = readBackReference(b, off, len);
+            final int backReferenceLen = readBackReference(b, off, len);
             if (!hasMoreDataInBlock()) {
                 state = State.NO_BLOCK;
             }
@@ -94,7 +94,7 @@ public class BlockLZ4CompressorInputStream extends AbstractLZ77CompressorInputSt
     }
 
     private void readSizes() throws IOException {
-        int nextBlock = readOneByte();
+        final int nextBlock = readOneByte();
         if (nextBlock == -1) {
             throw new IOException("Premature end of stream while looking for next block");
         }
@@ -131,7 +131,7 @@ public class BlockLZ4CompressorInputStream extends AbstractLZ77CompressorInputSt
         int backReferenceOffset = 0;
         try {
             backReferenceOffset = (int) ByteUtils.fromLittleEndian(supplier, 2);
-        } catch (IOException ex) {
+        } catch (final IOException ex) {
             if (nextBackReferenceSize == 0) { // the last block has no back-reference
                 return false;
             }
@@ -147,7 +147,7 @@ public class BlockLZ4CompressorInputStream extends AbstractLZ77CompressorInputSt
         }
         try {
             startBackReference(backReferenceOffset, backReferenceSize + 4);
-        } catch (IllegalArgumentException ex) {
+        } catch (final IllegalArgumentException ex) {
             throw new IOException("Illegal block with bad offset found", ex);
         }
         state = State.IN_BACK_REFERENCE;
diff --git a/src/main/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStream.java b/src/main/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStream.java
index ea9d195..d4ba040 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStream.java
@@ -83,10 +83,10 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
 
     private boolean finished = false;
 
-    private Deque<Pair> pairs = new LinkedList<>();
+    private final Deque<Pair> pairs = new LinkedList<>();
     // keeps track of the last window-size bytes (64k) in order to be
     // able to expand back-references when needed
-    private Deque<byte[]> expandedBlocks = new LinkedList<>();
+    private final Deque<byte[]> expandedBlocks = new LinkedList<>();
 
     /**
      * Creates a new LZ4 output stream.
@@ -110,12 +110,12 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
      *
      * @throws IOException if reading fails
      */
-    public BlockLZ4CompressorOutputStream(final OutputStream os, Parameters params) throws IOException {
+    public BlockLZ4CompressorOutputStream(final OutputStream os, final Parameters params) throws IOException {
         this.os = os;
         compressor = new LZ77Compressor(params,
             new LZ77Compressor.Callback() {
                 @Override
-                public void accept(LZ77Compressor.Block block) throws IOException {
+                public void accept(final LZ77Compressor.Block block) throws IOException {
                     switch (block.getType()) {
                     case LITERAL:
                         addLiteralBlock((LZ77Compressor.LiteralBlock) block);
@@ -132,13 +132,13 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
     }
 
     @Override
-    public void write(int b) throws IOException {
+    public void write(final int b) throws IOException {
         oneByte[0] = (byte) (b & 0xff);
         write(oneByte);
     }
 
     @Override
-    public void write(byte[] data, int off, int len) throws IOException {
+    public void write(final byte[] data, final int off, final int len) throws IOException {
         compressor.compress(data, off, len);
     }
 
@@ -172,28 +172,28 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
      * @throws IllegalStateException if the stream has already started to write data
      * @see LZ77Compressor#prefill
      */
-    public void prefill(byte[] data, int off, int len) {
+    public void prefill(final byte[] data, final int off, final int len) {
         if (len > 0) {
-            byte[] b = Arrays.copyOfRange(data, off, off + len);
+            final byte[] b = Arrays.copyOfRange(data, off, off + len);
             compressor.prefill(b);
             recordLiteral(b);
         }
     }
 
-    private void addLiteralBlock(LZ77Compressor.LiteralBlock block) throws IOException {
-        Pair last = writeBlocksAndReturnUnfinishedPair(block.getLength());
+    private void addLiteralBlock(final LZ77Compressor.LiteralBlock block) throws IOException {
+        final Pair last = writeBlocksAndReturnUnfinishedPair(block.getLength());
         recordLiteral(last.addLiteral(block));
         clearUnusedBlocksAndPairs();
     }
 
-    private void addBackReference(LZ77Compressor.BackReference block) throws IOException {
-        Pair last = writeBlocksAndReturnUnfinishedPair(block.getLength());
+    private void addBackReference(final LZ77Compressor.BackReference block) throws IOException {
+        final Pair last = writeBlocksAndReturnUnfinishedPair(block.getLength());
         last.setBackReference(block);
         recordBackReference(block);
         clearUnusedBlocksAndPairs();
     }
 
-    private Pair writeBlocksAndReturnUnfinishedPair(int length) throws IOException {
+    private Pair writeBlocksAndReturnUnfinishedPair(final int length) throws IOException {
         writeWritablePairs(length);
         Pair last = pairs.peekLast();
         if (last == null || last.hasBackReference()) {
@@ -203,7 +203,7 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
         return last;
     }
 
-    private void recordLiteral(byte[] b) {
+    private void recordLiteral(final byte[] b) {
         expandedBlocks.addFirst(b);
     }
 
@@ -215,7 +215,7 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
     private void clearUnusedBlocks() {
         int blockLengths = 0;
         int blocksToKeep = 0;
-        for (byte[] b : expandedBlocks) {
+        for (final byte[] b : expandedBlocks) {
             blocksToKeep++;
             blockLengths += b.length;
             if (blockLengths >= BlockLZ4CompressorInputStream.WINDOW_SIZE) {
@@ -228,15 +228,15 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
         }
     }
 
-    private void recordBackReference(LZ77Compressor.BackReference block) {
+    private void recordBackReference(final LZ77Compressor.BackReference block) {
         expandedBlocks.addFirst(expand(block.getOffset(), block.getLength()));
     }
 
     private byte[] expand(final int offset, final int length) {
-        byte[] expanded = new byte[length];
+        final byte[] expanded = new byte[length];
         if (offset == 1) { // surprisingly common special case
-            byte[] block = expandedBlocks.peekFirst();
-            byte b = block[block.length - 1];
+            final byte[] block = expandedBlocks.peekFirst();
+            final byte b = block[block.length - 1];
             if (b != 0) { // the fresh array contains 0s anyway
                 Arrays.fill(expanded, b);
             }
@@ -246,7 +246,7 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
         return expanded;
     }
 
-    private void expandFromList(final byte[] expanded, int offset, int length) {
+    private void expandFromList(final byte[] expanded, final int offset, final int length) {
         int offsetRemaining = offset;
         int lengthRemaining = length;
         int writeOffset = 0;
@@ -256,7 +256,7 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
             int copyLen, copyOffset;
             if (offsetRemaining > 0) {
                 int blockOffset = 0;
-                for (byte[] b : expandedBlocks) {
+                for (final byte[] b : expandedBlocks) {
                     if (b.length + blockOffset >= offsetRemaining) {
                         block = b;
                         break;
@@ -285,8 +285,8 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
     private void clearUnusedPairs() {
         int pairLengths = 0;
         int pairsToKeep = 0;
-        for (Iterator<Pair> it = pairs.descendingIterator(); it.hasNext(); ) {
-            Pair p = it.next();
+        for (final Iterator<Pair> it = pairs.descendingIterator(); it.hasNext(); ) {
+            final Pair p = it.next();
             pairsToKeep++;
             pairLengths += p.length();
             if (pairLengths >= BlockLZ4CompressorInputStream.WINDOW_SIZE) {
@@ -295,7 +295,7 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
         }
         final int size = pairs.size();
         for (int i = pairsToKeep; i < size; i++) {
-            Pair p = pairs.peekFirst();
+            final Pair p = pairs.peekFirst();
             if (p.hasBeenWritten()) {
                 pairs.removeFirst();
             } else {
@@ -306,7 +306,7 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
 
     private void writeFinalLiteralBlock() throws IOException {
         rewriteLastPairs();
-        for (Pair p : pairs) {
+        for (final Pair p : pairs) {
             if (!p.hasBeenWritten()) {
                 p.writeTo(os);
             }
@@ -314,16 +314,16 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
         pairs.clear();
     }
 
-    private void writeWritablePairs(int lengthOfBlocksAfterLastPair) throws IOException {
+    private void writeWritablePairs(final int lengthOfBlocksAfterLastPair) throws IOException {
         int unwrittenLength = lengthOfBlocksAfterLastPair;
-        for (Iterator<Pair> it = pairs.descendingIterator(); it.hasNext(); ) {
-            Pair p = it.next();
+        for (final Iterator<Pair> it = pairs.descendingIterator(); it.hasNext(); ) {
+            final Pair p = it.next();
             if (p.hasBeenWritten()) {
                 break;
             }
             unwrittenLength += p.length();
         }
-        for (Pair p : pairs) {
+        for (final Pair p : pairs) {
             if (p.hasBeenWritten()) {
                 continue;
             }
@@ -337,15 +337,15 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
     }
 
     private void rewriteLastPairs() {
-        LinkedList<Pair> lastPairs = new LinkedList<>();
-        LinkedList<Integer> pairLength = new LinkedList<>();
+        final LinkedList<Pair> lastPairs = new LinkedList<>();
+        final LinkedList<Integer> pairLength = new LinkedList<>();
         int offset = 0;
-        for (Iterator<Pair> it = pairs.descendingIterator(); it.hasNext(); ) {
-            Pair p = it.next();
+        for (final Iterator<Pair> it = pairs.descendingIterator(); it.hasNext(); ) {
+            final Pair p = it.next();
             if (p.hasBeenWritten()) {
                 break;
             }
-            int len = p.length();
+            final int len = p.length();
             pairLength.addFirst(len);
             lastPairs.addFirst(p);
             offset += len;
@@ -353,7 +353,7 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
                 break;
             }
         }
-        for (Pair p : lastPairs) {
+        for (final Pair p : lastPairs) {
             pairs.remove(p);
         }
         // lastPairs may contain between one and four Pairs:
@@ -385,13 +385,13 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
         for (int i = 1; i < lastPairsSize; i++) {
             toExpand += pairLength.get(i);
         }
-        Pair replacement = new Pair();
+        final Pair replacement = new Pair();
         if (toExpand > 0) {
             replacement.prependLiteral(expand(toExpand, toExpand));
         }
-        Pair splitCandidate = lastPairs.get(0);
-        int stillNeeded = MIN_OFFSET_OF_LAST_BACK_REFERENCE - toExpand;
-        int brLen = splitCandidate.hasBackReference() ? splitCandidate.backReferenceLength() : 0;
+        final Pair splitCandidate = lastPairs.get(0);
+        final int stillNeeded = MIN_OFFSET_OF_LAST_BACK_REFERENCE - toExpand;
+        final int brLen = splitCandidate.hasBackReference() ? splitCandidate.backReferenceLength() : 0;
         if (splitCandidate.hasBackReference() && brLen >= MIN_BACK_REFERENCE_LENGTH + stillNeeded) {
             replacement.prependLiteral(expand(toExpand + stillNeeded, stillNeeded));
             pairs.add(splitCandidate.splitWithNewBackReferenceLengthOf(brLen - stillNeeded));
@@ -409,7 +409,7 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
      * @return a builder correctly configured for the LZ4 algorithm
      */
     public static Parameters.Builder createParameterBuilder() {
-        int maxLen = BlockLZ4CompressorInputStream.WINDOW_SIZE - 1;
+        final int maxLen = BlockLZ4CompressorInputStream.WINDOW_SIZE - 1;
         return Parameters.builder(BlockLZ4CompressorInputStream.WINDOW_SIZE)
             .withMinBackReferenceLength(MIN_BACK_REFERENCE_LENGTH)
             .withMaxBackReferenceLength(maxLen)
@@ -422,16 +422,16 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
         private int brOffset, brLength;
         private boolean written;
 
-        private void prependLiteral(byte[] data) {
+        private void prependLiteral(final byte[] data) {
             literals.addFirst(data);
         }
-        byte[] addLiteral(LZ77Compressor.LiteralBlock block) {
-            byte[] copy = Arrays.copyOfRange(block.getData(), block.getOffset(),
+        byte[] addLiteral(final LZ77Compressor.LiteralBlock block) {
+            final byte[] copy = Arrays.copyOfRange(block.getData(), block.getOffset(),
                 block.getOffset() + block.getLength());
             literals.add(copy);
             return copy;
         }
-        void setBackReference(LZ77Compressor.BackReference block) {
+        void setBackReference(final LZ77Compressor.BackReference block) {
             if (hasBackReference()) {
                 throw new IllegalStateException();
             }
@@ -441,7 +441,7 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
         boolean hasBackReference() {
             return brOffset > 0;
         }
-        boolean canBeWritten(int lengthOfBlocksAfterThisPair) {
+        boolean canBeWritten(final int lengthOfBlocksAfterThisPair) {
             return hasBackReference()
                 && lengthOfBlocksAfterThisPair >= MIN_OFFSET_OF_LAST_BACK_REFERENCE + MIN_BACK_REFERENCE_LENGTH;
         }
@@ -451,13 +451,13 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
         private boolean hasBeenWritten() {
             return written;
         }
-        void writeTo(OutputStream out) throws IOException {
-            int litLength = literalLength();
+        void writeTo(final OutputStream out) throws IOException {
+            final int litLength = literalLength();
             out.write(lengths(litLength, brLength));
             if (litLength >= BlockLZ4CompressorInputStream.BACK_REFERENCE_SIZE_MASK) {
                 writeLength(litLength - BlockLZ4CompressorInputStream.BACK_REFERENCE_SIZE_MASK, out);
             }
-            for (byte[] b : literals) {
+            for (final byte[] b : literals) {
                 out.write(b);
             }
             if (hasBackReference()) {
@@ -471,17 +471,17 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
         }
         private int literalLength() {
             int length = 0;
-            for (byte[] b : literals) {
+            for (final byte[] b : literals) {
                 length += b.length;
             }
             return length;
         }
-        private static int lengths(int litLength, int brLength) {
-            int l = litLength < 15 ? litLength : 15;
-            int br = brLength < 4 ? 0 : (brLength < 19 ? brLength - 4 : 15);
+        private static int lengths(final int litLength, final int brLength) {
+            final int l = litLength < 15 ? litLength : 15;
+            final int br = brLength < 4 ? 0 : (brLength < 19 ? brLength - 4 : 15);
             return (l << BlockLZ4CompressorInputStream.SIZE_BITS) | br;
         }
-        private static void writeLength(int length, OutputStream out) throws IOException {
+        private static void writeLength(int length, final OutputStream out) throws IOException {
             while (length >= 255) {
                 out.write(255);
                 length -= 255;
@@ -491,14 +491,14 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream {
         private int backReferenceLength() {
             return brLength;
         }
-        private void prependTo(Pair other) {
-            Iterator<byte[]> listBackwards = literals.descendingIterator();
+        private void prependTo(final Pair other) {
+            final Iterator<byte[]> listBackwards = literals.descendingIterator();
             while (listBackwards.hasNext()) {
                 other.prependLiteral(listBackwards.next());
             }
         }
-        private Pair splitWithNewBackReferenceLengthOf(int newBackReferenceLength) {
-            Pair p = new Pair();
+        private Pair splitWithNewBackReferenceLengthOf(final int newBackReferenceLength) {
+            final Pair p = new Pair();
             p.literals.addAll(literals);
             p.brOffset = brOffset;
             p.brLength = newBackReferenceLength;
diff --git a/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStream.java b/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStream.java
index 85f83f8..869e7ea 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStream.java
@@ -97,7 +97,7 @@ public class FramedLZ4CompressorInputStream extends CompressorInputStream
      * @param in  the InputStream from which to read the compressed data
      * @throws IOException if reading fails
      */
-    public FramedLZ4CompressorInputStream(InputStream in) throws IOException {
+    public FramedLZ4CompressorInputStream(final InputStream in) throws IOException {
         this(in, false);
     }
 
@@ -111,7 +111,7 @@ public class FramedLZ4CompressorInputStream extends CompressorInputStream
      *          after the frame stream
      * @throws IOException if reading fails
      */
-    public FramedLZ4CompressorInputStream(InputStream in, boolean decompressConcatenated) throws IOException {
+    public FramedLZ4CompressorInputStream(final InputStream in, final boolean decompressConcatenated) throws IOException {
         this.inputStream = new CountingInputStream(in);
         this.decompressConcatenated = decompressConcatenated;
         init(true);
@@ -171,15 +171,15 @@ public class FramedLZ4CompressorInputStream extends CompressorInputStream
         return inputStream.getBytesRead();
     }
 
-    private void init(boolean firstFrame) throws IOException {
+    private void init(final boolean firstFrame) throws IOException {
         if (readSignature(firstFrame)) {
             readFrameDescriptor();
             nextBlock();
         }
     }
 
-    private boolean readSignature(boolean firstFrame) throws IOException {
-        String garbageMessage = firstFrame ? "Not a LZ4 frame stream" : "LZ4 frame stream followed by garbage";
+    private boolean readSignature(final boolean firstFrame) throws IOException {
+        final String garbageMessage = firstFrame ? "Not a LZ4 frame stream" : "LZ4 frame stream followed by garbage";
         final byte[] b = new byte[4];
         int read = IOUtils.readFully(inputStream, b);
         count(read);
@@ -205,7 +205,7 @@ public class FramedLZ4CompressorInputStream extends CompressorInputStream
     }
 
     private void readFrameDescriptor() throws IOException {
-        int flags = readOneByte();
+        final int flags = readOneByte();
         if (flags == -1) {
             throw new IOException("Premature end of stream while reading frame flags");
         }
@@ -224,25 +224,25 @@ public class FramedLZ4CompressorInputStream extends CompressorInputStream
         expectBlockChecksum = (flags & BLOCK_CHECKSUM_MASK) != 0;
         expectContentSize = (flags & CONTENT_SIZE_MASK) != 0;
         expectContentChecksum = (flags & CONTENT_CHECKSUM_MASK) != 0;
-        int bdByte = readOneByte();
+        final int bdByte = readOneByte();
         if (bdByte == -1) { // max size is irrelevant for this implementation
             throw new IOException("Premature end of stream while reading frame BD byte");
         }
         contentHash.update(bdByte);
         if (expectContentSize) { // for now we don't care, contains the uncompressed size
-            byte[] contentSize = new byte[8];
-            int skipped = IOUtils.readFully(inputStream, contentSize);
+            final byte[] contentSize = new byte[8];
+            final int skipped = IOUtils.readFully(inputStream, contentSize);
             count(skipped);
             if (8 != skipped) {
                 throw new IOException("Premature end of stream while reading content size");
             }
             contentHash.update(contentSize, 0, contentSize.length);
         }
-        int headerHash = readOneByte();
+        final int headerHash = readOneByte();
         if (headerHash == -1) { // partial hash of header.
             throw new IOException("Premature end of stream while reading frame header checksum");
         }
-        int expectedHash = (int) ((contentHash.getValue() >> 8) & 0xff);
+        final int expectedHash = (int) ((contentHash.getValue() >> 8) & 0xff);
         contentHash.reset();
         if (headerHash != expectedHash) {
             throw new IOException("Frame header checksum mismatch");
@@ -251,9 +251,9 @@ public class FramedLZ4CompressorInputStream extends CompressorInputStream
 
     private void nextBlock() throws IOException {
         maybeFinishCurrentBlock();
-        long len = ByteUtils.fromLittleEndian(supplier, 4);
-        boolean uncompressed = (len & UNCOMPRESSED_FLAG_MASK) != 0;
-        int realLen = (int) (len & (~UNCOMPRESSED_FLAG_MASK));
+        final long len = ByteUtils.fromLittleEndian(supplier, 4);
+        final boolean uncompressed = (len & UNCOMPRESSED_FLAG_MASK) != 0;
+        final int realLen = (int) (len & (~UNCOMPRESSED_FLAG_MASK));
         if (realLen < 0) {
             throw new IOException("Found illegal block with negative size");
         }
@@ -275,7 +275,7 @@ public class FramedLZ4CompressorInputStream extends CompressorInputStream
             currentBlock = capped;
         } else {
             inUncompressed = false;
-            BlockLZ4CompressorInputStream s = new BlockLZ4CompressorInputStream(capped);
+            final BlockLZ4CompressorInputStream s = new BlockLZ4CompressorInputStream(capped);
             if (expectBlockDependency) {
                 s.prefill(blockDependencyBuffer);
             }
@@ -301,14 +301,14 @@ public class FramedLZ4CompressorInputStream extends CompressorInputStream
         contentHash.reset();
     }
 
-    private void verifyChecksum(XXHash32 hash, String kind) throws IOException {
-        byte[] checksum = new byte[4];
-        int read = IOUtils.readFully(inputStream, checksum);
+    private void verifyChecksum(final XXHash32 hash, final String kind) throws IOException {
+        final byte[] checksum = new byte[4];
+        final int read = IOUtils.readFully(inputStream, checksum);
         count(read);
         if (4 != read) {
             throw new IOException("Premature end of stream while reading " + kind + " checksum");
         }
-        long expectedHash = hash.getValue();
+        final long expectedHash = hash.getValue();
         if (expectedHash != ByteUtils.fromLittleEndian(checksum)) {
             throw new IOException(kind + " checksum mismatch.");
         }
@@ -323,20 +323,20 @@ public class FramedLZ4CompressorInputStream extends CompressorInputStream
         return -1;
     }
 
-    private int readOnce(byte[] b, int off, int len) throws IOException {
+    private int readOnce(final byte[] b, final int off, final int len) throws IOException {
         if (inUncompressed) {
-            int cnt = currentBlock.read(b, off, len);
+            final int cnt = currentBlock.read(b, off, len);
             count(cnt);
             return cnt;
         }
-        BlockLZ4CompressorInputStream l = (BlockLZ4CompressorInputStream) currentBlock;
-        long before = l.getBytesRead();
-        int cnt = currentBlock.read(b, off, len);
+        final BlockLZ4CompressorInputStream l = (BlockLZ4CompressorInputStream) currentBlock;
+        final long before = l.getBytesRead();
+        final int cnt = currentBlock.read(b, off, len);
         count(l.getBytesRead() - before);
         return cnt;
     }
 
-    private static boolean isSkippableFrameSignature(byte[] b) {
+    private static boolean isSkippableFrameSignature(final byte[] b) {
         if ((b[0] & SKIPPABLE_FRAME_PREFIX_BYTE_MASK) != SKIPPABLE_FRAME_PREFIX_BYTE_MASK) {
             return false;
         }
@@ -356,14 +356,14 @@ public class FramedLZ4CompressorInputStream extends CompressorInputStream
      * hold an LZ4 signature and returns the number of bytes read
      * while storing the bytes in the given array.</p>
      */
-    private int skipSkippableFrame(byte[] b) throws IOException {
+    private int skipSkippableFrame(final byte[] b) throws IOException {
         int read = 4;
         while (read == 4 && isSkippableFrameSignature(b)) {
             final long len = ByteUtils.fromLittleEndian(supplier, 4);
             if (len < 0) {
                 throw new IOException("Found illegal skippable frame with negative size");
             }
-            long skipped = IOUtils.skip(inputStream, len);
+            final long skipped = IOUtils.skip(inputStream, len);
             count(skipped);
             if (len != skipped) {
                 throw new IOException("Premature end of stream while skipping frame");
@@ -377,7 +377,7 @@ public class FramedLZ4CompressorInputStream extends CompressorInputStream
     private void appendToBlockDependencyBuffer(final byte[] b, final int off, int len) {
         len = Math.min(len, blockDependencyBuffer.length);
         if (len > 0) {
-            int keep = blockDependencyBuffer.length - len;
+            final int keep = blockDependencyBuffer.length - len;
             if (keep > 0) {
                 // move last keep bytes towards the start of the buffer
                 System.arraycopy(blockDependencyBuffer, len, blockDependencyBuffer, 0, keep);
diff --git a/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorOutputStream.java b/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorOutputStream.java
index 4bd0023..81a1770 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorOutputStream.java
@@ -53,7 +53,7 @@ public class FramedLZ4CompressorOutputStream extends CompressorOutputStream {
     private final XXHash32 blockHash;
 
     // only created if the config requires block dependency
-    private byte[] blockDependencyBuffer;
+    private final byte[] blockDependencyBuffer;
     private int collectedBlockDependencyBytes;
 
     /**
@@ -70,7 +70,7 @@ public class FramedLZ4CompressorOutputStream extends CompressorOutputStream {
         M4(4096 * 1024, 7);
 
         private final int size, index;
-        BlockSize(int size, int index) {
+        BlockSize(final int size, final int index) {
             this.size = size;
             this.index = index;
         }
@@ -104,7 +104,7 @@ public class FramedLZ4CompressorOutputStream extends CompressorOutputStream {
          * disabled block checksums and independent blocks.
          * @param blockSize the size of a single block.
          */
-        public Parameters(BlockSize blockSize) {
+        public Parameters(final BlockSize blockSize) {
             this(blockSize, true, false, false);
         }
         /**
@@ -116,8 +116,8 @@ public class FramedLZ4CompressorOutputStream extends CompressorOutputStream {
          * in particular to balance compression ratio vs compression
          * speed.
          */
-        public Parameters(BlockSize blockSize,
-            org.apache.commons.compress.compressors.lz77support.Parameters lz77params) {
+        public Parameters(final BlockSize blockSize,
+            final org.apache.commons.compress.compressors.lz77support.Parameters lz77params) {
             this(blockSize, true, false, false, lz77params);
         }
         /**
@@ -132,8 +132,8 @@ public class FramedLZ4CompressorOutputStream extends CompressorOutputStream {
          * compression ratio but makes it impossible to decompress the
          * output in parallel.
          */
-        public Parameters(BlockSize blockSize, boolean withContentChecksum, boolean withBlockChecksum,
-            boolean withBlockDependency) {
+        public Parameters(final BlockSize blockSize, final boolean withContentChecksum, final boolean withBlockChecksum,
+            final boolean withBlockDependency) {
             this(blockSize, withContentChecksum, withBlockChecksum, withBlockDependency,
                  BlockLZ4CompressorOutputStream.createParameterBuilder().build());
         }
@@ -153,9 +153,9 @@ public class FramedLZ4CompressorOutputStream extends CompressorOutputStream {
          * in particular to balance compression ratio vs compression
          * speed.
          */
-        public Parameters(BlockSize blockSize, boolean withContentChecksum, boolean withBlockChecksum,
-                boolean withBlockDependency,
-                org.apache.commons.compress.compressors.lz77support.Parameters lz77params) {
+        public Parameters(final BlockSize blockSize, final boolean withContentChecksum, final boolean withBlockChecksum,
+                final boolean withBlockDependency,
+                final org.apache.commons.compress.compressors.lz77support.Parameters lz77params) {
             this.blockSize = blockSize;
             this.withContentChecksum = withContentChecksum;
             this.withBlockChecksum = withBlockChecksum;
@@ -176,7 +176,7 @@ public class FramedLZ4CompressorOutputStream extends CompressorOutputStream {
      * @param out the OutputStream to which to write the compressed data
      * @throws IOException if writing the signature fails
      */
-    public FramedLZ4CompressorOutputStream(OutputStream out) throws IOException {
+    public FramedLZ4CompressorOutputStream(final OutputStream out) throws IOException {
         this(out, Parameters.DEFAULT);
     }
 
@@ -187,7 +187,7 @@ public class FramedLZ4CompressorOutputStream extends CompressorOutputStream {
      * @param params the parameters to use
      * @throws IOException if writing the signature fails
      */
-    public FramedLZ4CompressorOutputStream(OutputStream out, Parameters params) throws IOException {
+    public FramedLZ4CompressorOutputStream(final OutputStream out, final Parameters params) throws IOException {
         this.params = params;
         blockData = new byte[params.blockSize.getSize()];
         this.out = out;
@@ -200,13 +200,13 @@ public class FramedLZ4CompressorOutputStream extends CompressorOutputStream {
     }
 
     @Override
-    public void write(int b) throws IOException {
+    public void write(final int b) throws IOException {
         oneByte[0] = (byte) (b & 0xff);
         write(oneByte);
     }
 
     @Override
-    public void write(byte[] data, int off, int len) throws IOException {
+    public void write(final byte[] data, int off, int len) throws IOException {
         if (params.withContentChecksum) {
             contentHash.update(data, off, len);
         }
@@ -261,7 +261,7 @@ public class FramedLZ4CompressorOutputStream extends CompressorOutputStream {
         }
         out.write(flags);
         contentHash.update(flags);
-        int bd = (params.blockSize.getIndex() << 4) & FramedLZ4CompressorInputStream.BLOCK_MAX_SIZE_MASK;
+        final int bd = (params.blockSize.getIndex() << 4) & FramedLZ4CompressorInputStream.BLOCK_MAX_SIZE_MASK;
         out.write(bd);
         contentHash.update(bd);
         out.write((int) ((contentHash.getValue() >> 8) & 0xff));
@@ -270,7 +270,7 @@ public class FramedLZ4CompressorOutputStream extends CompressorOutputStream {
 
     private void flushBlock() throws IOException {
         final boolean withBlockDependency = params.withBlockDependency;
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
         try (BlockLZ4CompressorOutputStream o = new BlockLZ4CompressorOutputStream(baos, params.lz77params)) {
             if (withBlockDependency) {
                 o.prefill(blockDependencyBuffer, blockDependencyBuffer.length - collectedBlockDependencyBytes,
@@ -281,7 +281,7 @@ public class FramedLZ4CompressorOutputStream extends CompressorOutputStream {
         if (withBlockDependency) {
             appendToBlockDependencyBuffer(blockData, 0, currentIndex);
         }
-        byte[] b = baos.toByteArray();
+        final byte[] b = baos.toByteArray();
         if (b.length > currentIndex) { // compression increased size, maybe beyond blocksize
             ByteUtils.toLittleEndian(out, currentIndex | FramedLZ4CompressorInputStream.UNCOMPRESSED_FLAG_MASK,
                 4);
@@ -313,7 +313,7 @@ public class FramedLZ4CompressorOutputStream extends CompressorOutputStream {
     private void appendToBlockDependencyBuffer(final byte[] b, final int off, int len) {
         len = Math.min(len, blockDependencyBuffer.length);
         if (len > 0) {
-            int keep = blockDependencyBuffer.length - len;
+            final int keep = blockDependencyBuffer.length - len;
             if (keep > 0) {
                 // move last keep bytes towards the start of the buffer
                 System.arraycopy(blockDependencyBuffer, len, blockDependencyBuffer, 0, keep);
diff --git a/src/main/java/org/apache/commons/compress/compressors/lz4/XXHash32.java b/src/main/java/org/apache/commons/compress/compressors/lz4/XXHash32.java
index 7493408..e4d9341 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lz4/XXHash32.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lz4/XXHash32.java
@@ -63,7 +63,7 @@ public class XXHash32 implements Checksum {
      * Creates an XXHash32 instance.
      * @param seed the seed to use
      */
-    public XXHash32(int seed) {
+    public XXHash32(final int seed) {
         this.seed = seed;
         initializeState();
     }
@@ -76,13 +76,13 @@ public class XXHash32 implements Checksum {
     }
 
     @Override
-    public void update(int b) {
+    public void update(final int b) {
         oneByte[0] = (byte) (b & 0xff);
         update(oneByte, 0, 1);
     }
 
     @Override
-    public void update(byte[] b, int off, final int len) {
+    public void update(final byte[] b, int off, final int len) {
         if (len <= 0) {
             return;
         }
@@ -146,7 +146,7 @@ public class XXHash32 implements Checksum {
         return hash & 0xffffffffL;
     }
 
-    private static int getInt(byte[] buffer, int idx) {
+    private static int getInt(final byte[] buffer, final int idx) {
         return (int) (fromLittleEndian(buffer, idx, 4) & 0xffffffffL);
     }
 
@@ -157,7 +157,7 @@ public class XXHash32 implements Checksum {
         state[3] = seed - PRIME1;
     }
 
-    private void process(byte[] b, int offset) {
+    private void process(final byte[] b, final int offset) {
         // local shadows for performance
         int s0 = state[0];
         int s1 = state[1];
diff --git a/src/main/java/org/apache/commons/compress/compressors/lz77support/AbstractLZ77CompressorInputStream.java b/src/main/java/org/apache/commons/compress/compressors/lz77support/AbstractLZ77CompressorInputStream.java
index ed0cb3c..cb1c4bb 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lz77support/AbstractLZ77CompressorInputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lz77support/AbstractLZ77CompressorInputStream.java
@@ -132,7 +132,7 @@ public abstract class AbstractLZ77CompressorInputStream extends CompressorInputS
      * @throws IOException if reading fails
      * @throws IllegalArgumentException if windowSize is not bigger than 0
      */
-    public AbstractLZ77CompressorInputStream(final InputStream is, int windowSize) throws IOException {
+    public AbstractLZ77CompressorInputStream(final InputStream is, final int windowSize) throws IOException {
         this.in = new CountingInputStream(is);
         if (windowSize <= 0) {
             throw new IllegalArgumentException("windowSize must be bigger than 0");
@@ -181,12 +181,12 @@ public abstract class AbstractLZ77CompressorInputStream extends CompressorInputS
      * @param data the data to fill the window with.
      * @throws IllegalStateException if the stream has already started to read data
      */
-    public void prefill(byte[] data) {
+    public void prefill(final byte[] data) {
         if (writeIndex != 0) {
             throw new IllegalStateException("The stream has already been read from, can't prefill anymore");
         }
         // we don't need more data than the big offset could refer to, so cap it
-        int len = Math.min(windowSize, data.length);
+        final int len = Math.min(windowSize, data.length);
         // we need the last data as we are dealing with *back*-references
         System.arraycopy(data, data.length - len, buf, 0, len);
         writeIndex += len;
@@ -207,7 +207,7 @@ public abstract class AbstractLZ77CompressorInputStream extends CompressorInputS
      * @param length the length of the block
      * @throws IllegalArgumentException if length is negative
      */
-    protected final void startLiteral(long length) {
+    protected final void startLiteral(final long length) {
         if (length < 0) {
             throw new IllegalArgumentException("length must not be negative");
         }
@@ -245,7 +245,7 @@ public abstract class AbstractLZ77CompressorInputStream extends CompressorInputS
         return readFromBuffer(b, off, len);
     }
 
-    private void tryToReadLiteral(int bytesToRead) throws IOException {
+    private void tryToReadLiteral(final int bytesToRead) throws IOException {
         // min of "what is still inside the literal", "what does the user want" and "how much can fit into the buffer"
         final int reallyTryToRead = Math.min((int) Math.min(bytesToRead, bytesRemaining),
                                              buf.length - writeIndex);
@@ -287,7 +287,7 @@ public abstract class AbstractLZ77CompressorInputStream extends CompressorInputS
      * bigger than the number of bytes available for back-references
      * or if length is negative
      */
-    protected final void startBackReference(int offset, long length) {
+    protected final void startBackReference(final int offset, final long length) {
         if (offset <= 0 || offset > writeIndex) {
             throw new IllegalArgumentException("offset must be bigger than 0 but not bigger than the number"
                 + " of bytes available for back-references");
@@ -319,10 +319,10 @@ public abstract class AbstractLZ77CompressorInputStream extends CompressorInputS
         return readFromBuffer(b, off, len);
     }
 
-    private void tryToCopy(int bytesToCopy) {
+    private void tryToCopy(final int bytesToCopy) {
         // this will fit into the buffer without sliding and not
         // require more than is available inside the back-reference
-        int copy = Math.min((int) Math.min(bytesToCopy, bytesRemaining),
+        final int copy = Math.min((int) Math.min(bytesToCopy, bytesRemaining),
                             buf.length - writeIndex);
         if (copy == 0) {
             // NOP
diff --git a/src/main/java/org/apache/commons/compress/compressors/lz77support/LZ77Compressor.java b/src/main/java/org/apache/commons/compress/compressors/lz77support/LZ77Compressor.java
index 461af65..33735f9 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lz77support/LZ77Compressor.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lz77support/LZ77Compressor.java
@@ -112,7 +112,7 @@ public class LZ77Compressor {
     public static final class LiteralBlock extends Block {
         private final byte[] data;
         private final int offset, length;
-        public LiteralBlock(byte[] data, int offset, int length) {
+        public LiteralBlock(final byte[] data, final int offset, final int length) {
             this.data = data;
             this.offset = offset;
             this.length = length;
@@ -156,7 +156,7 @@ public class LZ77Compressor {
      */
     public static final class BackReference extends Block {
         private final int offset, length;
-        public BackReference(int offset, int length) {
+        public BackReference(final int offset, final int length) {
             this.offset = offset;
             this.length = length;
         }
@@ -255,7 +255,7 @@ public class LZ77Compressor {
      * @param callback the callback
      * @throws NullPointerException if either parameter is <code>null</code>
      */
-    public LZ77Compressor(Parameters params, Callback callback) {
+    public LZ77Compressor(final Parameters params, final Callback callback) {
         Objects.requireNonNull(params, "params");
         Objects.requireNonNull(callback, "callback");
         
@@ -277,7 +277,7 @@ public class LZ77Compressor {
      * @param data the data to compress - must not be null
      * @throws IOException if the callback throws an exception
      */
-    public void compress(byte[] data) throws IOException {
+    public void compress(final byte[] data) throws IOException {
         compress(data, 0, data.length);
     }
 
@@ -290,7 +290,7 @@ public class LZ77Compressor {
      * @param len the number of bytes to compress
      * @throws IOException if the callback throws an exception
      */
-    public void compress(byte[] data, int off, int len) throws IOException {
+    public void compress(final byte[] data, int off, int len) throws IOException {
         final int wSize = params.getWindowSize();
         while (len > wSize) { // chop into windowSize sized chunks
             doCompress(data, off, wSize);
@@ -330,7 +330,7 @@ public class LZ77Compressor {
      * @param data the data to fill the window with.
      * @throws IllegalStateException if the compressor has already started to accept data
      */
-    public void prefill(byte[] data) {
+    public void prefill(final byte[] data) {
         if (currentPosition != 0 || lookahead != 0) {
             throw new IllegalStateException("The compressor has already started to accept data, can't prefill anymore");
         }
@@ -365,14 +365,14 @@ public class LZ77Compressor {
      * <p>The hash is shifted by five bits on each update so all
      * effects of A have been swapped after the third update.</p>
      */
-    private int nextHash(int oldHash, byte nextByte) {
+    private int nextHash(final int oldHash, final byte nextByte) {
         final int nextVal = nextByte & 0xFF;
         return ((oldHash << H_SHIFT) ^ nextVal) & HASH_MASK;
     }
 
     // performs the actual algorithm with the pre-condition len <= windowSize
-    private void doCompress(byte[] data, int off, int len) throws IOException {
-        int spaceLeft = window.length - currentPosition - lookahead;
+    private void doCompress(final byte[] data, final int off, final int len) throws IOException {
+        final int spaceLeft = window.length - currentPosition - lookahead;
         if (len > spaceLeft) {
             slide();
         }
@@ -397,11 +397,11 @@ public class LZ77Compressor {
         matchStart -= wSize;
         blockStart -= wSize;
         for (int i = 0; i < HASH_SIZE; i++) {
-            int h = head[i];
+            final int h = head[i];
             head[i] = h >= wSize ? h - wSize : NO_MATCH;
         }
         for (int i = 0; i < wSize; i++) {
-            int p = prev[i];
+            final int p = prev[i];
             prev[i] = p >= wSize ? p - wSize : NO_MATCH;
         }
     }
@@ -421,7 +421,7 @@ public class LZ77Compressor {
         while (lookahead >= minMatch) {
             catchUpMissedInserts();
             int matchLength = 0;
-            int hashHead = insertString(currentPosition);
+            final int hashHead = insertString(currentPosition);
             if (hashHead != NO_MATCH && hashHead - currentPosition <= params.getMaxOffset()) {
                 // sets matchStart as a side effect
                 matchLength = longestMatch(hashHead);
@@ -461,9 +461,9 @@ public class LZ77Compressor {
      * <p>Updates <code>insertHash</code> and <code>prev</code> as a
      * side effect.</p>
      */
-    private int insertString(int pos) {
+    private int insertString(final int pos) {
         insertHash = nextHash(insertHash, window[pos - 1 + NUMBER_OF_BYTES_IN_HASH]);
-        int hashHead = head[insertHash];
+        final int hashHead = head[insertHash];
         prev[pos & wMask] = hashHead;
         head[insertHash] = pos;
         return hashHead;
@@ -476,7 +476,7 @@ public class LZ77Compressor {
 
         lookahead--;
         currentPosition++;
-        int hashHead = insertString(currentPosition);
+        final int hashHead = insertString(currentPosition);
         final int prevHashHead = prev[currentPosition & wMask];
         int matchLength = longestMatch(hashHead);
 
@@ -494,7 +494,7 @@ public class LZ77Compressor {
         return matchLength;
     }
 
-    private void insertStringsInMatch(int matchLength) {
+    private void insertStringsInMatch(final int matchLength) {
         // inserts strings contained in current match
         // insertString inserts the byte 2 bytes after position, which may not yet be available -> missedInserts
         final int stop = Math.min(matchLength - 1, lookahead - NUMBER_OF_BYTES_IN_HASH);
@@ -511,7 +511,7 @@ public class LZ77Compressor {
         }
     }
 
-    private void flushBackReference(int matchLength) throws IOException {
+    private void flushBackReference(final int matchLength) throws IOException {
         callback.accept(new BackReference(currentPosition - matchStart, matchLength));
     }
 
diff --git a/src/main/java/org/apache/commons/compress/compressors/lz77support/Parameters.java b/src/main/java/org/apache/commons/compress/compressors/lz77support/Parameters.java
index bbe3907..0c28f42 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lz77support/Parameters.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lz77support/Parameters.java
@@ -43,7 +43,7 @@ public final class Parameters {
      * @throws IllegalArgumentException if windowSize is not a power of two.
      * @return a builder configured for the given window size
      */
-    public static Builder builder(int windowSize) {
+    public static Builder builder(final int windowSize) {
         return new Builder(windowSize);
     }
 
@@ -56,7 +56,7 @@ public final class Parameters {
         private Integer niceBackReferenceLength, maxCandidates, lazyThreshold;
         private Boolean lazyMatches;
 
-        private Builder(int windowSize) {
+        private Builder(final int windowSize) {
             if (windowSize < 2 || !isPowerOfTwo(windowSize)) {
                 throw new IllegalArgumentException("windowSize must be a power of two");
             }
@@ -85,7 +85,7 @@ public final class Parameters {
          * is smaller than <code>minBackReferenceLength</code>.
          * @return the builder
          */
-        public Builder withMinBackReferenceLength(int minBackReferenceLength) {
+        public Builder withMinBackReferenceLength(final int minBackReferenceLength) {
             this.minBackReferenceLength = Math.max(TRUE_MIN_BACK_REFERENCE_LENGTH, minBackReferenceLength);
             if (windowSize < this.minBackReferenceLength) {
                 throw new IllegalArgumentException("minBackReferenceLength can't be bigger than windowSize");
@@ -111,7 +111,7 @@ public final class Parameters {
          * is capped at <code>windowSize - 1</code>.
          * @return the builder
          */
-        public Builder withMaxBackReferenceLength(int maxBackReferenceLength) {
+        public Builder withMaxBackReferenceLength(final int maxBackReferenceLength) {
             this.maxBackReferenceLength = maxBackReferenceLength < minBackReferenceLength ? minBackReferenceLength
                 : Math.min(maxBackReferenceLength, windowSize - 1);
             return this;
@@ -131,7 +131,7 @@ public final class Parameters {
          * - 1</code>.
          * @return the builder
          */
-        public Builder withMaxOffset(int maxOffset) {
+        public Builder withMaxOffset(final int maxOffset) {
             this.maxOffset = maxOffset < 1 ? windowSize - 1 : Math.min(maxOffset, windowSize - 1);
             return this;
         }
@@ -150,7 +150,7 @@ public final class Parameters {
          * <code>windowSize</code>.
          * @return the builder
          */
-        public Builder withMaxLiteralLength(int maxLiteralLength) {
+        public Builder withMaxLiteralLength(final int maxLiteralLength) {
             this.maxLiteralLength = maxLiteralLength < 1 ? windowSize
                 : Math.min(maxLiteralLength, windowSize);
             return this;
@@ -165,7 +165,7 @@ public final class Parameters {
          * @param niceLen the "nice length" of a back-reference
          * @return the builder
          */
-        public Builder withNiceBackReferenceLength(int niceLen) {
+        public Builder withNiceBackReferenceLength(final int niceLen) {
             niceBackReferenceLength = niceLen;
             return this;
         }
@@ -177,7 +177,7 @@ public final class Parameters {
          * @param maxCandidates maximum number of back-reference candidates
          * @return the builder
          */
-        public Builder withMaxNumberOfCandidates(int maxCandidates) {
+        public Builder withMaxNumberOfCandidates(final int maxCandidates) {
             this.maxCandidates = maxCandidates;
             return this;
         }
@@ -192,7 +192,7 @@ public final class Parameters {
          * @param lazy whether lazy matching should be performed
          * @return the builder
          */
-        public Builder withLazyMatching(boolean lazy) {
+        public Builder withLazyMatching(final boolean lazy) {
             lazyMatches = lazy;
             return this;
         }
@@ -205,7 +205,7 @@ public final class Parameters {
          * @param threshold the threshold for lazy matching
          * @return the builder
          */
-        public Builder withLazyThreshold(int threshold) {
+        public Builder withLazyThreshold(final int threshold) {
             lazyThreshold = threshold;
             return this;
         }
@@ -245,11 +245,11 @@ public final class Parameters {
          */
         public Parameters build() {
             // default settings tuned for a compromise of good compression and acceptable speed
-            int niceLen = niceBackReferenceLength != null ? niceBackReferenceLength
+            final int niceLen = niceBackReferenceLength != null ? niceBackReferenceLength
                 : Math.max(minBackReferenceLength, maxBackReferenceLength / 2);
-            int candidates = maxCandidates != null ? maxCandidates : Math.max(256, windowSize / 128);
-            boolean lazy = lazyMatches == null || lazyMatches;
-            int threshold = lazy ? (lazyThreshold != null ? lazyThreshold : niceLen) : minBackReferenceLength;
+            final int candidates = maxCandidates != null ? maxCandidates : Math.max(256, windowSize / 128);
+            final boolean lazy = lazyMatches == null || lazyMatches;
+            final int threshold = lazy ? (lazyThreshold != null ? lazyThreshold : niceLen) : minBackReferenceLength;
 
             return new Parameters(windowSize, minBackReferenceLength, maxBackReferenceLength,
                 maxOffset, maxLiteralLength, niceLen, candidates, lazy, threshold);
@@ -260,9 +260,9 @@ public final class Parameters {
         niceBackReferenceLength, maxCandidates, lazyThreshold;
     private final boolean lazyMatching;
 
-    private Parameters(int windowSize, int minBackReferenceLength, int maxBackReferenceLength, int maxOffset,
-            int maxLiteralLength, int niceBackReferenceLength, int maxCandidates, boolean lazyMatching,
-            int lazyThreshold) {
+    private Parameters(final int windowSize, final int minBackReferenceLength, final int maxBackReferenceLength, final int maxOffset,
+            final int maxLiteralLength, final int niceBackReferenceLength, final int maxCandidates, final boolean lazyMatching,
+            final int lazyThreshold) {
         this.windowSize = windowSize;
         this.minBackReferenceLength = minBackReferenceLength;
         this.maxBackReferenceLength = maxBackReferenceLength;
@@ -343,7 +343,7 @@ public final class Parameters {
         return lazyThreshold;
     }
 
-    private static final boolean isPowerOfTwo(int x) {
+    private static final boolean isPowerOfTwo(final int x) {
         // pre-condition: x > 0
         return (x & (x - 1)) == 0;
     }
diff --git a/src/main/java/org/apache/commons/compress/compressors/lzma/LZMACompressorInputStream.java b/src/main/java/org/apache/commons/compress/compressors/lzma/LZMACompressorInputStream.java
index 794e3a5..9fe20bc 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lzma/LZMACompressorInputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lzma/LZMACompressorInputStream.java
@@ -73,11 +73,11 @@ public class LZMACompressorInputStream extends CompressorInputStream
      *
      * @since 1.14
      */
-    public LZMACompressorInputStream(final InputStream inputStream, int memoryLimitInKb)
+    public LZMACompressorInputStream(final InputStream inputStream, final int memoryLimitInKb)
             throws IOException {
         try {
             in = new LZMAInputStream(countingStream = new CountingInputStream(inputStream), memoryLimitInKb);
-        } catch (org.tukaani.xz.MemoryLimitException e) {
+        } catch (final org.tukaani.xz.MemoryLimitException e) {
             //convert to commons-compress exception
             throw new MemoryLimitException(e.getMemoryNeeded(), e.getMemoryLimit(), e);
         }
diff --git a/src/main/java/org/apache/commons/compress/compressors/lzw/LZWInputStream.java b/src/main/java/org/apache/commons/compress/compressors/lzw/LZWInputStream.java
index 4f14387..abf6f88 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lzw/LZWInputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lzw/LZWInputStream.java
@@ -143,8 +143,8 @@ public abstract class LZWInputStream extends CompressorInputStream implements In
         if (memoryLimitInKb > -1) {
             final int maxTableSize = 1 << maxCodeSize;
             //account for potential overflow
-            long memoryUsageInBytes = (long) maxTableSize * 6;//(4 (prefixes) + 1 (characters) +1 (outputStack))
-            long memoryUsageInKb = memoryUsageInBytes >> 10;
+            final long memoryUsageInBytes = (long) maxTableSize * 6;//(4 (prefixes) + 1 (characters) +1 (outputStack))
+            final long memoryUsageInKb = memoryUsageInBytes >> 10;
 
             if (memoryUsageInKb > memoryLimitInKb) {
                 throw new MemoryLimitException(memoryUsageInKb, memoryLimitInKb);
diff --git a/src/main/java/org/apache/commons/compress/compressors/snappy/FramedSnappyCompressorOutputStream.java b/src/main/java/org/apache/commons/compress/compressors/snappy/FramedSnappyCompressorOutputStream.java
index 4449b28..7e23194 100644
--- a/src/main/java/org/apache/commons/compress/compressors/snappy/FramedSnappyCompressorOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/snappy/FramedSnappyCompressorOutputStream.java
@@ -71,7 +71,7 @@ public class FramedSnappyCompressorOutputStream extends CompressorOutputStream {
      * particular to balance compression ratio vs compression speed.
      * @throws IOException if writing the signature fails
      */
-    public FramedSnappyCompressorOutputStream(final OutputStream out, Parameters params) throws IOException {
+    public FramedSnappyCompressorOutputStream(final OutputStream out, final Parameters params) throws IOException {
         this.out = out;
         this.params = params;
         consumer = new ByteUtils.OutputStreamByteConsumer(out);
@@ -79,13 +79,13 @@ public class FramedSnappyCompressorOutputStream extends CompressorOutputStream {
     }
 
     @Override
-    public void write(int b) throws IOException {
+    public void write(final int b) throws IOException {
         oneByte[0] = (byte) (b & 0xff);
         write(oneByte);
     }
 
     @Override
-    public void write(byte[] data, int off, int len) throws IOException {
+    public void write(final byte[] data, int off, int len) throws IOException {
         if (currentIndex + len > MAX_COMPRESSED_BUFFER_SIZE) {
             flushBuffer();
             while (len > MAX_COMPRESSED_BUFFER_SIZE) {
@@ -122,18 +122,18 @@ public class FramedSnappyCompressorOutputStream extends CompressorOutputStream {
 
     private void flushBuffer() throws IOException {
         out.write(FramedSnappyCompressorInputStream.COMPRESSED_CHUNK_TYPE);
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
         try (OutputStream o = new SnappyCompressorOutputStream(baos, currentIndex, params)) {
             o.write(buffer, 0, currentIndex);
         }
-        byte[] b = baos.toByteArray();
+        final byte[] b = baos.toByteArray();
         writeLittleEndian(3, b.length + 4L /* CRC */);
         writeCrc();
         out.write(b);
         currentIndex = 0;
     }
 
-    private void writeLittleEndian(final int numBytes, long num) throws IOException {
+    private void writeLittleEndian(final int numBytes, final long num) throws IOException {
         ByteUtils.toLittleEndian(consumer, num, numBytes);
     }
 
diff --git a/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorInputStream.java b/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorInputStream.java
index da43648..fd80fd8 100644
--- a/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorInputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorInputStream.java
@@ -102,13 +102,13 @@ public class SnappyCompressorInputStream extends AbstractLZ77CompressorInputStre
             fill();
             return read(b, off, len);
         case IN_LITERAL:
-            int litLen = readLiteral(b, off, len);
+            final int litLen = readLiteral(b, off, len);
             if (!hasMoreDataInBlock()) {
                 state = State.NO_BLOCK;
             }
             return litLen > 0 ? litLen : read(b, off, len);
         case IN_BACK_REFERENCE:
-            int backReferenceLen = readBackReference(b, off, len);
+            final int backReferenceLen = readBackReference(b, off, len);
             if (!hasMoreDataInBlock()) {
                 state = State.NO_BLOCK;
             }
@@ -172,7 +172,7 @@ public class SnappyCompressorInputStream extends AbstractLZ77CompressorInputStre
 
             try {
                 startBackReference(offset, length);
-            } catch (IllegalArgumentException ex) {
+            } catch (final IllegalArgumentException ex) {
                 throw new IOException("Illegal block with bad offset found", ex);
             }
             state = State.IN_BACK_REFERENCE;
@@ -198,7 +198,7 @@ public class SnappyCompressorInputStream extends AbstractLZ77CompressorInputStre
 
             try {
                 startBackReference(offset, length);
-            } catch (IllegalArgumentException ex) {
+            } catch (final IllegalArgumentException ex) {
                 throw new IOException("Illegal block with bad offset found", ex);
             }
             state = State.IN_BACK_REFERENCE;
@@ -223,7 +223,7 @@ public class SnappyCompressorInputStream extends AbstractLZ77CompressorInputStre
 
             try {
                 startBackReference(offset, length);
-            } catch (IllegalArgumentException ex) {
+            } catch (final IllegalArgumentException ex) {
                 throw new IOException("Illegal block with bad offset found", ex);
             }
             state = State.IN_BACK_REFERENCE;
diff --git a/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorOutputStream.java b/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorOutputStream.java
index 0c7b3b1..ac040f7 100644
--- a/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorOutputStream.java
@@ -95,13 +95,13 @@ public class SnappyCompressorOutputStream extends CompressorOutputStream {
      * length of 64 bytes
      * @throws IOException if writing of the size fails
      */
-    public SnappyCompressorOutputStream(final OutputStream os, final long uncompressedSize, Parameters params)
+    public SnappyCompressorOutputStream(final OutputStream os, final long uncompressedSize, final Parameters params)
         throws IOException {
         this.os = os;
         consumer = new ByteUtils.OutputStreamByteConsumer(os);
         compressor = new LZ77Compressor(params, new LZ77Compressor.Callback() {
                 @Override
-                public void accept(LZ77Compressor.Block block) throws IOException {
+                public void accept(final LZ77Compressor.Block block) throws IOException {
                     switch (block.getType()) {
                     case LITERAL:
                         writeLiteralBlock((LZ77Compressor.LiteralBlock) block);
@@ -118,13 +118,13 @@ public class SnappyCompressorOutputStream extends CompressorOutputStream {
     }
 
     @Override
-    public void write(int b) throws IOException {
+    public void write(final int b) throws IOException {
         oneByte[0] = (byte) (b & 0xff);
         write(oneByte);
     }
 
     @Override
-    public void write(byte[] data, int off, int len) throws IOException {
+    public void write(final byte[] data, final int off, final int len) throws IOException {
         compressor.compress(data, off, len);
     }
 
@@ -174,8 +174,8 @@ public class SnappyCompressorOutputStream extends CompressorOutputStream {
     private static final int THREE_SIZE_BYTE_MARKER = 62 << 2;
     private static final int FOUR_SIZE_BYTE_MARKER = 63 << 2;
 
-    private void writeLiteralBlock(LZ77Compressor.LiteralBlock block) throws IOException {
-        int len = block.getLength();
+    private void writeLiteralBlock(final LZ77Compressor.LiteralBlock block) throws IOException {
+        final int len = block.getLength();
         if (len <= MAX_LITERAL_SIZE_WITHOUT_SIZE_BYTES) {
             writeLiteralBlockNoSizeBytes(block, len);
         } else if (len <= MAX_LITERAL_SIZE_WITH_ONE_SIZE_BYTE) {
@@ -189,34 +189,34 @@ public class SnappyCompressorOutputStream extends CompressorOutputStream {
         }
     }
 
-    private void writeLiteralBlockNoSizeBytes(LZ77Compressor.LiteralBlock block, int len) throws IOException {
+    private void writeLiteralBlockNoSizeBytes(final LZ77Compressor.LiteralBlock block, final int len) throws IOException {
         writeLiteralBlockWithSize(len - 1 << 2, 0, len, block);
     }
 
-    private void writeLiteralBlockOneSizeByte(LZ77Compressor.LiteralBlock block, int len) throws IOException {
+    private void writeLiteralBlockOneSizeByte(final LZ77Compressor.LiteralBlock block, final int len) throws IOException {
         writeLiteralBlockWithSize(ONE_SIZE_BYTE_MARKER, 1, len, block);
     }
 
-    private void writeLiteralBlockTwoSizeBytes(LZ77Compressor.LiteralBlock block, int len) throws IOException {
+    private void writeLiteralBlockTwoSizeBytes(final LZ77Compressor.LiteralBlock block, final int len) throws IOException {
         writeLiteralBlockWithSize(TWO_SIZE_BYTE_MARKER, 2, len, block);
     }
 
-    private void writeLiteralBlockThreeSizeBytes(LZ77Compressor.LiteralBlock block, int len) throws IOException {
+    private void writeLiteralBlockThreeSizeBytes(final LZ77Compressor.LiteralBlock block, final int len) throws IOException {
         writeLiteralBlockWithSize(THREE_SIZE_BYTE_MARKER, 3, len, block);
     }
 
-    private void writeLiteralBlockFourSizeBytes(LZ77Compressor.LiteralBlock block, int len) throws IOException {
+    private void writeLiteralBlockFourSizeBytes(final LZ77Compressor.LiteralBlock block, final int len) throws IOException {
         writeLiteralBlockWithSize(FOUR_SIZE_BYTE_MARKER, 4, len, block);
     }
 
-    private void writeLiteralBlockWithSize(int tagByte, int sizeBytes, int len, LZ77Compressor.LiteralBlock block)
+    private void writeLiteralBlockWithSize(final int tagByte, final int sizeBytes, final int len, final LZ77Compressor.LiteralBlock block)
         throws IOException {
         os.write(tagByte);
         writeLittleEndian(sizeBytes, len - 1);
         os.write(block.getData(), block.getOffset(), len);
     }
 
-    private void writeLittleEndian(final int numBytes, int num) throws IOException {
+    private void writeLittleEndian(final int numBytes, final int num) throws IOException {
         ByteUtils.toLittleEndian(consumer, num, numBytes);
     }
 
@@ -231,7 +231,7 @@ public class SnappyCompressorOutputStream extends CompressorOutputStream {
     private static final int TWO_BYTE_COPY_TAG = 2;
     private static final int FOUR_BYTE_COPY_TAG = 3;
 
-    private void writeBackReference(LZ77Compressor.BackReference block) throws IOException {
+    private void writeBackReference(final LZ77Compressor.BackReference block) throws IOException {
         final int len = block.getLength();
         final int offset = block.getOffset();
         if (len >= MIN_MATCH_LENGTH_WITH_ONE_OFFSET_BYTE && len <= MAX_MATCH_LENGTH_WITH_ONE_OFFSET_BYTE
@@ -244,20 +244,20 @@ public class SnappyCompressorOutputStream extends CompressorOutputStream {
         }
     }
 
-    private void writeBackReferenceWithOneOffsetByte(int len, int offset) throws IOException {
+    private void writeBackReferenceWithOneOffsetByte(final int len, final int offset) throws IOException {
         os.write(ONE_BYTE_COPY_TAG | ((len - 4) << 2) | ((offset & 0x700) >> 3));
         os.write(offset & 0xff);
     }
 
-    private void writeBackReferenceWithTwoOffsetBytes(int len, int offset) throws IOException {
+    private void writeBackReferenceWithTwoOffsetBytes(final int len, final int offset) throws IOException {
         writeBackReferenceWithLittleEndianOffset(TWO_BYTE_COPY_TAG, 2, len, offset);
     }
 
-    private void writeBackReferenceWithFourOffsetBytes(int len, int offset) throws IOException {
+    private void writeBackReferenceWithFourOffsetBytes(final int len, final int offset) throws IOException {
         writeBackReferenceWithLittleEndianOffset(FOUR_BYTE_COPY_TAG, 4, len, offset);
     }
 
-    private void writeBackReferenceWithLittleEndianOffset(int tag, int offsetBytes, int len, int offset)
+    private void writeBackReferenceWithLittleEndianOffset(final int tag, final int offsetBytes, final int len, final int offset)
         throws IOException {
         os.write(tag | ((len - 1) << 2));
         writeLittleEndian(offsetBytes, offset);
@@ -275,7 +275,7 @@ public class SnappyCompressorOutputStream extends CompressorOutputStream {
      * @param blockSize the block size.
      * @return a builder correctly configured for the Snappy algorithm using the gven block size
      */
-    public static Parameters.Builder createParameterBuilder(int blockSize) {
+    public static Parameters.Builder createParameterBuilder(final int blockSize) {
         // the max offset and max literal length defined by the format
         // are 2^32 - 1 and 2^32 respectively - with blockSize being
         // an integer we will never exceed that
diff --git a/src/main/java/org/apache/commons/compress/compressors/xz/XZCompressorInputStream.java b/src/main/java/org/apache/commons/compress/compressors/xz/XZCompressorInputStream.java
index e977448..8d3b214 100644
--- a/src/main/java/org/apache/commons/compress/compressors/xz/XZCompressorInputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/xz/XZCompressorInputStream.java
@@ -125,8 +125,8 @@ public class XZCompressorInputStream extends CompressorInputStream
      *
      * @since 1.14
      */
-    public XZCompressorInputStream(InputStream inputStream,
-                                   boolean decompressConcatenated, final int memoryLimitInKb)
+    public XZCompressorInputStream(final InputStream inputStream,
+                                   final boolean decompressConcatenated, final int memoryLimitInKb)
             throws IOException {
         countingStream = new CountingInputStream(inputStream);
         if (decompressConcatenated) {
@@ -142,7 +142,7 @@ public class XZCompressorInputStream extends CompressorInputStream
             final int ret = in.read();
             count(ret == -1 ? -1 : 1);
             return ret;
-        } catch (org.tukaani.xz.MemoryLimitException e) {
+        } catch (final org.tukaani.xz.MemoryLimitException e) {
             throw new MemoryLimitException(e.getMemoryNeeded(), e.getMemoryLimit(), e);
         }
     }
@@ -156,7 +156,7 @@ public class XZCompressorInputStream extends CompressorInputStream
             final int ret = in.read(buf, off, len);
             count(ret);
             return ret;
-        } catch (org.tukaani.xz.MemoryLimitException e) {
+        } catch (final org.tukaani.xz.MemoryLimitException e) {
             //convert to commons-compress MemoryLimtException
             throw new MemoryLimitException(e.getMemoryNeeded(), e.getMemoryLimit(), e);
         }
@@ -166,7 +166,7 @@ public class XZCompressorInputStream extends CompressorInputStream
     public long skip(final long n) throws IOException {
         try {
             return IOUtils.skip(in, n);
-        } catch (org.tukaani.xz.MemoryLimitException e) {
+        } catch (final org.tukaani.xz.MemoryLimitException e) {
             //convert to commons-compress MemoryLimtException
             throw new MemoryLimitException(e.getMemoryNeeded(), e.getMemoryLimit(), e);
         }
diff --git a/src/main/java/org/apache/commons/compress/compressors/zstandard/ZstdCompressorOutputStream.java b/src/main/java/org/apache/commons/compress/compressors/zstandard/ZstdCompressorOutputStream.java
index 7418d3a..8fdc8b5 100644
--- a/src/main/java/org/apache/commons/compress/compressors/zstandard/ZstdCompressorOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/zstandard/ZstdCompressorOutputStream.java
@@ -43,8 +43,8 @@ public class ZstdCompressorOutputStream extends CompressorOutputStream {
      * @throws IOException if zstd-jni does
      * @since 1.18
      */
-    public ZstdCompressorOutputStream(final OutputStream outStream, int level, boolean closeFrameOnFlush,
-        boolean useChecksum) throws IOException {
+    public ZstdCompressorOutputStream(final OutputStream outStream, final int level, final boolean closeFrameOnFlush,
+        final boolean useChecksum) throws IOException {
         this.encOS = new ZstdOutputStream(outStream, level);
         this.encOS.setCloseFrameOnFlush(closeFrameOnFlush);
         this.encOS.setChecksum(useChecksum);
@@ -58,7 +58,7 @@ public class ZstdCompressorOutputStream extends CompressorOutputStream {
      * @throws IOException if zstd-jni does
      * @since 1.18
      */
-    public ZstdCompressorOutputStream(final OutputStream outStream, int level, boolean closeFrameOnFlush)
+    public ZstdCompressorOutputStream(final OutputStream outStream, final int level, final boolean closeFrameOnFlush)
         throws IOException {
         this.encOS = new ZstdOutputStream(outStream, level);
         this.encOS.setCloseFrameOnFlush(closeFrameOnFlush);
@@ -72,7 +72,7 @@ public class ZstdCompressorOutputStream extends CompressorOutputStream {
      * @throws IOException if zstd-jni does
      * @since 1.18
      */
-    public ZstdCompressorOutputStream(final OutputStream outStream, int level) throws IOException {
+    public ZstdCompressorOutputStream(final OutputStream outStream, final int level) throws IOException {
         this.encOS = new ZstdOutputStream(outStream, level);
     }
 
diff --git a/src/main/java/org/apache/commons/compress/parallel/FileBasedScatterGatherBackingStore.java b/src/main/java/org/apache/commons/compress/parallel/FileBasedScatterGatherBackingStore.java
index d36e389..5d0d628 100644
--- a/src/main/java/org/apache/commons/compress/parallel/FileBasedScatterGatherBackingStore.java
+++ b/src/main/java/org/apache/commons/compress/parallel/FileBasedScatterGatherBackingStore.java
@@ -38,9 +38,9 @@ public class FileBasedScatterGatherBackingStore implements ScatterGatherBackingS
         this.target = target;
         try {
             os = Files.newOutputStream(target.toPath());
-        } catch (FileNotFoundException ex) {
+        } catch (final FileNotFoundException ex) {
             throw ex;
-        } catch (IOException ex) {
+        } catch (final IOException ex) {
             // must convert exception to stay backwards compatible with Compress 1.10 to 1.13
             throw new RuntimeException(ex); // NOSONAR
         }
diff --git a/src/main/java/org/apache/commons/compress/utils/BitInputStream.java b/src/main/java/org/apache/commons/compress/utils/BitInputStream.java
index 8abff5f..e4e5d79 100644
--- a/src/main/java/org/apache/commons/compress/utils/BitInputStream.java
+++ b/src/main/java/org/apache/commons/compress/utils/BitInputStream.java
@@ -119,7 +119,7 @@ public class BitInputStream implements Closeable {
      * @since 1.16
      */
     public void alignWithByteBoundary() {
-        int toSkip = bitsCachedSize % Byte.SIZE;
+        final int toSkip = bitsCachedSize % Byte.SIZE;
         if (toSkip > 0) {
             readCachedBits(toSkip);
         }
@@ -143,19 +143,19 @@ public class BitInputStream implements Closeable {
         long overflow = 0L;
 
         // bitsCachedSize >= 57 and left-shifting it 8 bits would cause an overflow
-        int bitsToAddCount = count - bitsCachedSize;
+        final int bitsToAddCount = count - bitsCachedSize;
         overflowBits = Byte.SIZE - bitsToAddCount;
         final long nextByte = in.read();
         if (nextByte < 0) {
             return nextByte;
         }
         if (byteOrder == ByteOrder.LITTLE_ENDIAN) {
-            long bitsToAdd = nextByte & MASKS[bitsToAddCount];
+            final long bitsToAdd = nextByte & MASKS[bitsToAddCount];
             bitsCached |= (bitsToAdd << bitsCachedSize);
             overflow = (nextByte >>> bitsToAddCount) & MASKS[overflowBits];
         } else {
             bitsCached <<= bitsToAddCount;
-            long bitsToAdd = (nextByte >>> (overflowBits)) & MASKS[bitsToAddCount];
+            final long bitsToAdd = (nextByte >>> (overflowBits)) & MASKS[bitsToAddCount];
             bitsCached |= bitsToAdd;
             overflow = nextByte & MASKS[overflowBits];
         }
@@ -165,7 +165,7 @@ public class BitInputStream implements Closeable {
         return bitsOut;
     }
 
-    private long readCachedBits(int count) {
+    private long readCachedBits(final int count) {
         final long bitsOut;
         if (byteOrder == ByteOrder.LITTLE_ENDIAN) {
             bitsOut = (bitsCached & MASKS[count]);
diff --git a/src/main/java/org/apache/commons/compress/utils/BoundedInputStream.java b/src/main/java/org/apache/commons/compress/utils/BoundedInputStream.java
index 1db436a..2e874bb 100644
--- a/src/main/java/org/apache/commons/compress/utils/BoundedInputStream.java
+++ b/src/main/java/org/apache/commons/compress/utils/BoundedInputStream.java
@@ -79,8 +79,8 @@ public class BoundedInputStream extends InputStream {
      */
     @Override
     public long skip(final long n) throws IOException {
-        long bytesToSkip = Math.min(bytesRemaining, n);
-        long bytesSkipped = in.skip(bytesToSkip);
+        final long bytesToSkip = Math.min(bytesRemaining, n);
+        final long bytesSkipped = in.skip(bytesToSkip);
         bytesRemaining -= bytesSkipped;
 
         return bytesSkipped;
diff --git a/src/main/java/org/apache/commons/compress/utils/ByteUtils.java b/src/main/java/org/apache/commons/compress/utils/ByteUtils.java
index ae3ca69..25dc150 100644
--- a/src/main/java/org/apache/commons/compress/utils/ByteUtils.java
+++ b/src/main/java/org/apache/commons/compress/utils/ByteUtils.java
@@ -64,7 +64,7 @@ public final class ByteUtils {
      * @param bytes the byte array to convert
      * @return the number read
      */
-    public static long fromLittleEndian(byte[] bytes) {
+    public static long fromLittleEndian(final byte[] bytes) {
         return fromLittleEndian(bytes, 0, bytes.length);
     }
 
@@ -76,7 +76,7 @@ public final class ByteUtils {
      * @return the number read
      * @throws IllegalArgumentException if len is bigger than eight
      */
-    public static long fromLittleEndian(byte[] bytes, final int off, final int length) {
+    public static long fromLittleEndian(final byte[] bytes, final int off, final int length) {
         checkReadLength(length);
         long l = 0;
         for (int i = 0; i < length; i++) {
@@ -94,12 +94,12 @@ public final class ByteUtils {
      * @throws IOException if reading fails or the stream doesn't
      * contain the given number of bytes anymore
      */
-    public static long fromLittleEndian(InputStream in, int length) throws IOException {
+    public static long fromLittleEndian(final InputStream in, final int length) throws IOException {
         // somewhat duplicates the ByteSupplier version in order to save the creation of a wrapper object
         checkReadLength(length);
         long l = 0;
         for (int i = 0; i < length; i++) {
-            long b = in.read();
+            final long b = in.read();
             if (b == -1) {
                 throw new IOException("Premature end of data");
             }
@@ -121,11 +121,11 @@ public final class ByteUtils {
      * @throws IOException if the supplier fails or doesn't supply the
      * given number of bytes anymore
      */
-    public static long fromLittleEndian(ByteSupplier supplier, final int length) throws IOException {
+    public static long fromLittleEndian(final ByteSupplier supplier, final int length) throws IOException {
         checkReadLength(length);
         long l = 0;
         for (int i = 0; i < length; i++) {
-            long b = supplier.getAsByte();
+            final long b = supplier.getAsByte();
             if (b == -1) {
                 throw new IOException("Premature end of data");
             }
@@ -143,12 +143,12 @@ public final class ByteUtils {
      * @throws IOException if reading fails or the stream doesn't
      * contain the given number of bytes anymore
      */
-    public static long fromLittleEndian(DataInput in, int length) throws IOException {
+    public static long fromLittleEndian(final DataInput in, final int length) throws IOException {
         // somewhat duplicates the ByteSupplier version in order to save the creation of a wrapper object
         checkReadLength(length);
         long l = 0;
         for (int i = 0; i < length; i++) {
-            long b = in.readUnsignedByte();
+            final long b = in.readUnsignedByte();
             l |= (b << (i * 8));
         }
         return l;
@@ -178,7 +178,7 @@ public final class ByteUtils {
      * @param length the number of bytes to use to represent the value
      * @throws IOException if writing fails
      */
-    public static void toLittleEndian(OutputStream out, final long value, final int length)
+    public static void toLittleEndian(final OutputStream out, final long value, final int length)
         throws IOException {
         // somewhat duplicates the ByteConsumer version in order to save the creation of a wrapper object
         long num = value;
@@ -196,7 +196,7 @@ public final class ByteUtils {
      * @param length the number of bytes to use to represent the value
      * @throws IOException if writing fails
      */
-    public static void toLittleEndian(ByteConsumer consumer, final long value, final int length)
+    public static void toLittleEndian(final ByteConsumer consumer, final long value, final int length)
         throws IOException {
         long num = value;
         for (int i = 0; i < length; i++) {
@@ -213,7 +213,7 @@ public final class ByteUtils {
      * @param length the number of bytes to use to represent the value
      * @throws IOException if writing fails
      */
-    public static void toLittleEndian(DataOutput out, final long value, final int length)
+    public static void toLittleEndian(final DataOutput out, final long value, final int length)
         throws IOException {
         // somewhat duplicates the ByteConsumer version in order to save the creation of a wrapper object
         long num = value;
@@ -229,7 +229,7 @@ public final class ByteUtils {
      */
     public static class InputStreamByteSupplier implements ByteSupplier {
         private final InputStream is;
-        public InputStreamByteSupplier(InputStream is) {
+        public InputStreamByteSupplier(final InputStream is) {
             this.is = is;
         }
         @Override
@@ -244,16 +244,16 @@ public final class ByteUtils {
      */
     public static class OutputStreamByteConsumer implements ByteConsumer {
         private final OutputStream os;
-        public OutputStreamByteConsumer(OutputStream os) {
+        public OutputStreamByteConsumer(final OutputStream os) {
             this.os = os;
         }
         @Override
-        public void accept(int b) throws IOException {
+        public void accept(final int b) throws IOException {
             os.write(b);
         }
     }
 
-    private static final void checkReadLength(int length) {
+    private static final void checkReadLength(final int length) {
         if (length > 8) {
             throw new IllegalArgumentException("Can't read more than eight bytes into a long value");
         }
diff --git a/src/main/java/org/apache/commons/compress/utils/CloseShieldFilterInputStream.java b/src/main/java/org/apache/commons/compress/utils/CloseShieldFilterInputStream.java
index a0ec8ff..c1ce797 100644
--- a/src/main/java/org/apache/commons/compress/utils/CloseShieldFilterInputStream.java
+++ b/src/main/java/org/apache/commons/compress/utils/CloseShieldFilterInputStream.java
@@ -29,7 +29,7 @@ import java.io.InputStream;
  */
 public class CloseShieldFilterInputStream extends FilterInputStream {
 
-    public CloseShieldFilterInputStream(InputStream in) {
+    public CloseShieldFilterInputStream(final InputStream in) {
         super(in);
     }
 
diff --git a/src/main/java/org/apache/commons/compress/utils/FileNameUtils.java b/src/main/java/org/apache/commons/compress/utils/FileNameUtils.java
index 80981ca..e77aee1 100644
--- a/src/main/java/org/apache/commons/compress/utils/FileNameUtils.java
+++ b/src/main/java/org/apache/commons/compress/utils/FileNameUtils.java
@@ -37,13 +37,13 @@ public class FileNameUtils {
      * @return the extension of filename
      * @param filename the name of the file to obtain the extension of.
      */
-    public static String getExtension(String filename) {
+    public static String getExtension(final String filename) {
         if (filename == null) {
             return null;
         }
 
-        String name = new File(filename).getName();
-        int extensionPosition = name.lastIndexOf('.');
+        final String name = new File(filename).getName();
+        final int extensionPosition = name.lastIndexOf('.');
         if (extensionPosition < 0) {
             return "";
         }
@@ -61,14 +61,14 @@ public class FileNameUtils {
      * @return the basename of filename
      * @param filename the name of the file to obtain the basename of.
      */
-    public static String getBaseName(String filename) {
+    public static String getBaseName(final String filename) {
         if (filename == null) {
             return null;
         }
 
-        String name = new File(filename).getName();
+        final String name = new File(filename).getName();
 
-        int extensionPosition = name.lastIndexOf('.');
+        final int extensionPosition = name.lastIndexOf('.');
         if (extensionPosition < 0) {
             return name;
         }
diff --git a/src/main/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStream.java b/src/main/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStream.java
index 6e02534..7320f90 100644
--- a/src/main/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStream.java
@@ -59,9 +59,9 @@ public class FixedLengthBlockOutputStream extends OutputStream implements Writab
      * @param os   The stream to wrap.
      * @param blockSize The block size to use.
      */
-    public FixedLengthBlockOutputStream(OutputStream os, int blockSize) {
+    public FixedLengthBlockOutputStream(final OutputStream os, final int blockSize) {
         if (os instanceof FileOutputStream) {
-            FileOutputStream fileOutputStream = (FileOutputStream) os;
+            final FileOutputStream fileOutputStream = (FileOutputStream) os;
             out = fileOutputStream.getChannel();
             buffer = ByteBuffer.allocateDirect(blockSize);
         } else {
@@ -75,7 +75,7 @@ public class FixedLengthBlockOutputStream extends OutputStream implements Writab
      * @param out   The writable byte channel to wrap.
      * @param blockSize The block size to use.
      */
-    public FixedLengthBlockOutputStream(WritableByteChannel out, int blockSize) {
+    public FixedLengthBlockOutputStream(final WritableByteChannel out, final int blockSize) {
         this.out = out;
         this.blockSize = blockSize;
         this.buffer = ByteBuffer.allocateDirect(blockSize);
@@ -89,10 +89,10 @@ public class FixedLengthBlockOutputStream extends OutputStream implements Writab
 
     private void writeBlock() throws IOException {
         buffer.flip();
-        int i = out.write(buffer);
-        boolean hasRemaining = buffer.hasRemaining();
+        final int i = out.write(buffer);
+        final boolean hasRemaining = buffer.hasRemaining();
         if (i != blockSize || hasRemaining) {
-            String msg = String
+            final String msg = String
                 .format("Failed to write %,d bytes atomically. Only wrote  %,d",
                     blockSize, i);
             throw new IOException(msg);
@@ -101,7 +101,7 @@ public class FixedLengthBlockOutputStream extends OutputStream implements Writab
     }
 
     @Override
-    public void write(int b) throws IOException {
+    public void write(final int b) throws IOException {
         if (!isOpen()) {
             throw new ClosedChannelException();
         }
@@ -110,14 +110,14 @@ public class FixedLengthBlockOutputStream extends OutputStream implements Writab
     }
 
     @Override
-    public void write(byte[] b, final int offset, final int length) throws IOException {
+    public void write(final byte[] b, final int offset, final int length) throws IOException {
         if (!isOpen()) {
             throw new ClosedChannelException();
         }
         int off = offset;
         int len = length;
         while (len > 0) {
-            int n = Math.min(len, buffer.remaining());
+            final int n = Math.min(len, buffer.remaining());
             buffer.put(b, off, n);
             maybeFlush();
             len -= n;
@@ -126,22 +126,22 @@ public class FixedLengthBlockOutputStream extends OutputStream implements Writab
     }
 
     @Override
-    public int write(ByteBuffer src) throws IOException {
+    public int write(final ByteBuffer src) throws IOException {
         if (!isOpen()) {
             throw new ClosedChannelException();
         }
-        int srcRemaining = src.remaining();
+        final int srcRemaining = src.remaining();
 
         if (srcRemaining < buffer.remaining()) {
             // if don't have enough bytes in src to fill up a block we must buffer
             buffer.put(src);
         } else {
             int srcLeft = srcRemaining;
-            int savedLimit = src.limit();
+            final int savedLimit = src.limit();
             // If we're not at the start of buffer, we have some bytes already  buffered
             // fill up the reset of buffer and write the block.
             if (buffer.position() != 0) {
-                int n = buffer.remaining();
+                final int n = buffer.remaining();
                 src.limit(src.position() + n);
                 buffer.put(src);
                 writeBlock();
@@ -195,9 +195,9 @@ public class FixedLengthBlockOutputStream extends OutputStream implements Writab
         buffer.order(ByteOrder.nativeOrder());
         int bytesToWrite = buffer.remaining();
         if (bytesToWrite > 8) {
-            int align = buffer.position() & 7;
+            final int align = buffer.position() & 7;
             if (align != 0) {
-                int limit = 8 - align;
+                final int limit = 8 - align;
                 for (int i = 0; i < limit; i++) {
                     buffer.put((byte) 0);
                 }
@@ -225,12 +225,12 @@ public class FixedLengthBlockOutputStream extends OutputStream implements Writab
         private final OutputStream out;
         private final AtomicBoolean closed = new AtomicBoolean(false);
 
-        private BufferAtATimeOutputChannel(OutputStream out) {
+        private BufferAtATimeOutputChannel(final OutputStream out) {
             this.out = out;
         }
 
         @Override
-        public int write(ByteBuffer buffer) throws IOException {
+        public int write(final ByteBuffer buffer) throws IOException {
             if (!isOpen()) {
                 throw new ClosedChannelException();
             }
@@ -239,15 +239,15 @@ public class FixedLengthBlockOutputStream extends OutputStream implements Writab
             }
 
             try {
-                int pos = buffer.position();
-                int len = buffer.limit() - pos;
+                final int pos = buffer.position();
+                final int len = buffer.limit() - pos;
                 out.write(buffer.array(), buffer.arrayOffset() + pos, len);
                 buffer.position(buffer.limit());
                 return len;
-            } catch (IOException e) {
+            } catch (final IOException e) {
                 try {
                     close();
-                } catch (IOException ignored) { //NOSONAR
+                } catch (final IOException ignored) { //NOSONAR
                 }
                 throw e;
             }
diff --git a/src/main/java/org/apache/commons/compress/utils/FlushShieldFilterOutputStream.java b/src/main/java/org/apache/commons/compress/utils/FlushShieldFilterOutputStream.java
index 239e823..07108b5 100644
--- a/src/main/java/org/apache/commons/compress/utils/FlushShieldFilterOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/utils/FlushShieldFilterOutputStream.java
@@ -28,7 +28,7 @@ import java.io.OutputStream;
  */
 public class FlushShieldFilterOutputStream extends FilterOutputStream {
 
-    public FlushShieldFilterOutputStream(OutputStream out) {
+    public FlushShieldFilterOutputStream(final OutputStream out) {
         super(out);
     }
 
diff --git a/src/main/java/org/apache/commons/compress/utils/IOUtils.java b/src/main/java/org/apache/commons/compress/utils/IOUtils.java
index 566fb4d..8e79e01 100644
--- a/src/main/java/org/apache/commons/compress/utils/IOUtils.java
+++ b/src/main/java/org/apache/commons/compress/utils/IOUtils.java
@@ -219,11 +219,11 @@ public final class IOUtils {
      * @throws IOException - if an I/O error occurs.
      * @throws EOFException - if the channel reaches the end before reading all the bytes.
      */
-    public static void readFully(ReadableByteChannel channel, ByteBuffer b) throws IOException {
+    public static void readFully(final ReadableByteChannel channel, final ByteBuffer b) throws IOException {
         final int expectedLength = b.remaining();
         int read = 0;
         while (read < expectedLength) {
-            int readNow = channel.read(b);
+            final int readNow = channel.read(b);
             if (readNow <= 0) {
                 break;
             }
@@ -279,7 +279,7 @@ public final class IOUtils {
      * @throws IOException if an I/O error occurs when reading or writing.
      * @since 1.21
      */
-    public static void copy(File sourceFile, OutputStream outputStream) throws IOException {
+    public static void copy(final File sourceFile, final OutputStream outputStream) throws IOException {
         Files.copy(sourceFile.toPath(), outputStream);
     }
 }
diff --git a/src/main/java/org/apache/commons/compress/utils/MultiReadOnlySeekableByteChannel.java b/src/main/java/org/apache/commons/compress/utils/MultiReadOnlySeekableByteChannel.java
index 70e3add..f0c166c 100644
--- a/src/main/java/org/apache/commons/compress/utils/MultiReadOnlySeekableByteChannel.java
+++ b/src/main/java/org/apache/commons/compress/utils/MultiReadOnlySeekableByteChannel.java
@@ -54,13 +54,13 @@ public class MultiReadOnlySeekableByteChannel implements SeekableByteChannel {
      * @param channels the channels to concatenate
      * @throws NullPointerException if channels is null
      */
-    public MultiReadOnlySeekableByteChannel(List<SeekableByteChannel> channels) {
+    public MultiReadOnlySeekableByteChannel(final List<SeekableByteChannel> channels) {
         this.channels = Collections.unmodifiableList(new ArrayList<>(
             Objects.requireNonNull(channels, "channels must not be null")));
     }
 
     @Override
-    public synchronized int read(ByteBuffer dst) throws IOException {
+    public synchronized int read(final ByteBuffer dst) throws IOException {
         if (!isOpen()) {
             throw new ClosedChannelException();
         }
@@ -93,10 +93,10 @@ public class MultiReadOnlySeekableByteChannel implements SeekableByteChannel {
     @Override
     public void close() throws IOException {
         IOException first = null;
-        for (SeekableByteChannel ch : channels) {
+        for (final SeekableByteChannel ch : channels) {
             try {
                 ch.close();
-            } catch (IOException ex) {
+            } catch (final IOException ex) {
                 if (first == null) {
                     first = ex;
                 }
@@ -109,7 +109,7 @@ public class MultiReadOnlySeekableByteChannel implements SeekableByteChannel {
 
     @Override
     public boolean isOpen() {
-        for (SeekableByteChannel ch : channels) {
+        for (final SeekableByteChannel ch : channels) {
             if (!ch.isOpen()) {
                 return false;
             }
@@ -137,7 +137,7 @@ public class MultiReadOnlySeekableByteChannel implements SeekableByteChannel {
      * @return global position of all channels as if they are a single channel
      * @throws IOException if positioning fails
      */
-    public synchronized SeekableByteChannel position(long channelNumber, long relativeOffset) throws IOException {
+    public synchronized SeekableByteChannel position(final long channelNumber, final long relativeOffset) throws IOException {
         if (!isOpen()) {
             throw new ClosedChannelException();
         }
@@ -155,7 +155,7 @@ public class MultiReadOnlySeekableByteChannel implements SeekableByteChannel {
             throw new ClosedChannelException();
         }
         long acc = 0;
-        for (SeekableByteChannel ch : channels) {
+        for (final SeekableByteChannel ch : channels) {
             acc += ch.size();
         }
         return acc;
@@ -165,7 +165,7 @@ public class MultiReadOnlySeekableByteChannel implements SeekableByteChannel {
      * @throws NonWritableChannelException since this implementation is read-only.
      */
     @Override
-    public SeekableByteChannel truncate(long size) {
+    public SeekableByteChannel truncate(final long size) {
         throw new NonWritableChannelException();
     }
 
@@ -173,12 +173,12 @@ public class MultiReadOnlySeekableByteChannel implements SeekableByteChannel {
      * @throws NonWritableChannelException since this implementation is read-only.
      */
     @Override
-    public int write(ByteBuffer src) {
+    public int write(final ByteBuffer src) {
         throw new NonWritableChannelException();
     }
 
     @Override
-    public synchronized SeekableByteChannel position(long newPosition) throws IOException {
+    public synchronized SeekableByteChannel position(final long newPosition) throws IOException {
         if (newPosition < 0) {
             throw new IllegalArgumentException("Negative position: " + newPosition);
         }
@@ -202,7 +202,7 @@ public class MultiReadOnlySeekableByteChannel implements SeekableByteChannel {
             } else if (pos <= size) {
                 // This channel is where we want to be
                 currentChannelIdx = i;
-                long tmp = pos;
+                final long tmp = pos;
                 pos = -1L; // Mark pos as already being set
                 newChannelPos = tmp;
             } else {
@@ -225,7 +225,7 @@ public class MultiReadOnlySeekableByteChannel implements SeekableByteChannel {
      * @throws NullPointerException if channels is null
      * @return SeekableByteChannel that concatenates all provided channels
      */
-    public static SeekableByteChannel forSeekableByteChannels(SeekableByteChannel... channels) {
+    public static SeekableByteChannel forSeekableByteChannels(final SeekableByteChannel... channels) {
         if (Objects.requireNonNull(channels, "channels must not be null").length == 1) {
             return channels[0];
         }
@@ -240,9 +240,9 @@ public class MultiReadOnlySeekableByteChannel implements SeekableByteChannel {
      * @throws IOException if opening a channel for one of the files fails
      * @return SeekableByteChannel that concatenates all provided files
      */
-    public static SeekableByteChannel forFiles(File... files) throws IOException {
-        List<SeekableByteChannel> channels = new ArrayList<>();
-        for (File f : Objects.requireNonNull(files, "files must not be null")) {
+    public static SeekableByteChannel forFiles(final File... files) throws IOException {
+        final List<SeekableByteChannel> channels = new ArrayList<>();
+        for (final File f : Objects.requireNonNull(files, "files must not be null")) {
             channels.add(Files.newByteChannel(f.toPath(), StandardOpenOption.READ));
         }
         if (channels.size() == 1) {
diff --git a/src/main/java/org/apache/commons/compress/utils/SeekableInMemoryByteChannel.java b/src/main/java/org/apache/commons/compress/utils/SeekableInMemoryByteChannel.java
index fd083c4..51f5ac3 100644
--- a/src/main/java/org/apache/commons/compress/utils/SeekableInMemoryByteChannel.java
+++ b/src/main/java/org/apache/commons/compress/utils/SeekableInMemoryByteChannel.java
@@ -52,7 +52,7 @@ public class SeekableInMemoryByteChannel implements SeekableByteChannel {
      *
      * @param data input data or pre-allocated array.
      */
-    public SeekableInMemoryByteChannel(byte[] data) {
+    public SeekableInMemoryByteChannel(final byte[] data) {
         this.data = data;
         size = data.length;
     }
@@ -71,7 +71,7 @@ public class SeekableInMemoryByteChannel implements SeekableByteChannel {
      *
      * @param size size of internal buffer to allocate, in bytes.
      */
-    public SeekableInMemoryByteChannel(int size) {
+    public SeekableInMemoryByteChannel(final int size) {
         this(new byte[size]);
     }
 
@@ -88,7 +88,7 @@ public class SeekableInMemoryByteChannel implements SeekableByteChannel {
     }
 
     @Override
-    public SeekableByteChannel position(long newPosition) throws IOException {
+    public SeekableByteChannel position(final long newPosition) throws IOException {
         ensureOpen();
         if (newPosition < 0L || newPosition > Integer.MAX_VALUE) {
             throw new IllegalArgumentException("Position has to be in range 0.. " + Integer.MAX_VALUE);
@@ -115,7 +115,7 @@ public class SeekableInMemoryByteChannel implements SeekableByteChannel {
      * invoked on a closed channel.</p>
      */
     @Override
-    public SeekableByteChannel truncate(long newSize) {
+    public SeekableByteChannel truncate(final long newSize) {
         if (newSize < 0L || newSize > Integer.MAX_VALUE) {
             throw new IllegalArgumentException("Size has to be in range 0.. " + Integer.MAX_VALUE);
         }
@@ -129,10 +129,10 @@ public class SeekableInMemoryByteChannel implements SeekableByteChannel {
     }
 
     @Override
-    public int read(ByteBuffer buf) throws IOException {
+    public int read(final ByteBuffer buf) throws IOException {
         ensureOpen();
         int wanted = buf.remaining();
-        int possible = size - position;
+        final int possible = size - position;
         if (possible <= 0) {
             return -1;
         }
@@ -155,12 +155,12 @@ public class SeekableInMemoryByteChannel implements SeekableByteChannel {
     }
 
     @Override
-    public int write(ByteBuffer b) throws IOException {
+    public int write(final ByteBuffer b) throws IOException {
         ensureOpen();
         int wanted = b.remaining();
-        int possibleWithoutResize = size - position;
+        final int possibleWithoutResize = size - position;
         if (wanted > possibleWithoutResize) {
-            int newSize = position + wanted;
+            final int newSize = position + wanted;
             if (newSize < 0) { // overflow
                 resize(Integer.MAX_VALUE);
                 wanted = Integer.MAX_VALUE - position;
@@ -189,7 +189,7 @@ public class SeekableInMemoryByteChannel implements SeekableByteChannel {
         return data;
     }
 
-    private void resize(int newLength) {
+    private void resize(final int newLength) {
         int len = data.length;
         if (len <= 0) {
             len = 1;
diff --git a/src/main/java/org/apache/commons/compress/utils/Sets.java b/src/main/java/org/apache/commons/compress/utils/Sets.java
index 0a7921b..329b6b8 100644
--- a/src/main/java/org/apache/commons/compress/utils/Sets.java
+++ b/src/main/java/org/apache/commons/compress/utils/Sets.java
@@ -42,7 +42,7 @@ public class Sets {
      * @return A new HasSet
      */
     @SafeVarargs
-    public static <E> HashSet<E> newHashSet(E... elements) {
+    public static <E> HashSet<E> newHashSet(final E... elements) {
         final HashSet<E> set = new HashSet<>(elements.length);
         Collections.addAll(set, elements);
         return set;
diff --git a/src/main/java/org/apache/commons/compress/utils/SkipShieldingInputStream.java b/src/main/java/org/apache/commons/compress/utils/SkipShieldingInputStream.java
index a5f79a1..edb5289 100644
--- a/src/main/java/org/apache/commons/compress/utils/SkipShieldingInputStream.java
+++ b/src/main/java/org/apache/commons/compress/utils/SkipShieldingInputStream.java
@@ -40,12 +40,12 @@ public class SkipShieldingInputStream extends FilterInputStream {
     private static final int SKIP_BUFFER_SIZE = 8192;
     // we can use a shared buffer as the content is discarded anyway
     private static final byte[] SKIP_BUFFER = new byte[SKIP_BUFFER_SIZE];
-    public SkipShieldingInputStream(InputStream in) {
+    public SkipShieldingInputStream(final InputStream in) {
         super(in);
     }
 
     @Override
-    public long skip(long n) throws IOException {
+    public long skip(final long n) throws IOException {
         return n < 0 ? 0 : read(SKIP_BUFFER, 0, (int) Math.min(n, SKIP_BUFFER_SIZE));
     }
 }
diff --git a/src/test/java/org/apache/commons/compress/ArchiveReadTest.java b/src/test/java/org/apache/commons/compress/ArchiveReadTest.java
index ad016a2..c9cc951 100644
--- a/src/test/java/org/apache/commons/compress/ArchiveReadTest.java
+++ b/src/test/java/org/apache/commons/compress/ArchiveReadTest.java
@@ -55,7 +55,7 @@ public class ArchiveReadTest extends AbstractTestCase {
     static {
         try {
             ARCDIR = new File(CLASSLOADER.getResource("archives").toURI());
-        } catch (URISyntaxException e) {
+        } catch (final URISyntaxException e) {
             throw new RuntimeException(e);
         }
     }
diff --git a/src/test/java/org/apache/commons/compress/ArchiveUtilsTest.java b/src/test/java/org/apache/commons/compress/ArchiveUtilsTest.java
index 9e4c51b..264adac 100644
--- a/src/test/java/org/apache/commons/compress/ArchiveUtilsTest.java
+++ b/src/test/java/org/apache/commons/compress/ArchiveUtilsTest.java
@@ -99,7 +99,7 @@ public class ArchiveUtilsTest extends AbstractTestCase {
     @Test
     public void testIsEqualWithNullWithPositive() {
 
-        byte[] byteArray = new byte[8];
+        final byte[] byteArray = new byte[8];
         byteArray[1] = (byte) (-77);
 
         assertFalse(ArchiveUtils.isEqualWithNull(byteArray, 0, (byte)0, byteArray, (byte)0, (byte)80));
@@ -109,7 +109,7 @@ public class ArchiveUtilsTest extends AbstractTestCase {
     @Test
     public void testToAsciiBytes() {
 
-        byte[] byteArray = ArchiveUtils.toAsciiBytes("SOCKET");
+        final byte[] byteArray = ArchiveUtils.toAsciiBytes("SOCKET");
 
         assertArrayEquals(new byte[] {(byte)83, (byte)79, (byte)67, (byte)75, (byte)69, (byte)84}, byteArray);
 
@@ -120,8 +120,8 @@ public class ArchiveUtilsTest extends AbstractTestCase {
     @Test
     public void testToStringWithNonNull() {
 
-        SevenZArchiveEntry sevenZArchiveEntry = new SevenZArchiveEntry();
-        String string = ArchiveUtils.toString(sevenZArchiveEntry);
+        final SevenZArchiveEntry sevenZArchiveEntry = new SevenZArchiveEntry();
+        final String string = ArchiveUtils.toString(sevenZArchiveEntry);
 
         assertEquals("-       0 null", string);
 
@@ -137,7 +137,7 @@ public class ArchiveUtilsTest extends AbstractTestCase {
     @Test(expected = StringIndexOutOfBoundsException.class)
     public void testToAsciiStringThrowsStringIndexOutOfBoundsException() {
 
-        byte[] byteArray = new byte[3];
+        final byte[] byteArray = new byte[3];
 
         ArchiveUtils.toAsciiString(byteArray, 940, 2730);
 
diff --git a/src/test/java/org/apache/commons/compress/MockEvilInputStream.java b/src/test/java/org/apache/commons/compress/MockEvilInputStream.java
index 9c03a21..ec31617 100644
--- a/src/test/java/org/apache/commons/compress/MockEvilInputStream.java
+++ b/src/test/java/org/apache/commons/compress/MockEvilInputStream.java
@@ -34,7 +34,7 @@ public class MockEvilInputStream extends InputStream {
     }
 
     @Override
-    public int read(byte[] bytes, int offset, int length) throws IOException {
+    public int read(final byte[] bytes, final int offset, final int length) throws IOException {
         throw new IOException("Evil");
     }
 }
diff --git a/src/test/java/org/apache/commons/compress/archivers/ArchiveOutputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/ArchiveOutputStreamTest.java
index 0ed878b..3f1d598 100644
--- a/src/test/java/org/apache/commons/compress/archivers/ArchiveOutputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/ArchiveOutputStreamTest.java
@@ -196,9 +196,9 @@ public class ArchiveOutputStreamTest extends AbstractTestCase {
         }
     }
 
-    private ArchiveOutputStream createArchiveWithDummyEntry(String archiveType, OutputStream out1, File dummy)
+    private ArchiveOutputStream createArchiveWithDummyEntry(final String archiveType, final OutputStream out1, final File dummy)
         throws Exception {
-        ArchiveOutputStream aos1 = factory.createArchiveOutputStream(archiveType, out1);
+        final ArchiveOutputStream aos1 = factory.createArchiveOutputStream(archiveType, out1);
         aos1.putArchiveEntry(aos1.createArchiveEntry(dummy, "dummy"));
         try (InputStream is = new FileInputStream(dummy)) {
             IOUtils.copy(is, aos1);
diff --git a/src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java b/src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java
index 713656a..ed3a9ce 100644
--- a/src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java
@@ -229,7 +229,7 @@ public class ArchiveStreamFactoryTest {
 
     @Test
     public void testDetect() throws Exception {
-        for (String extension : new String[]{
+        for (final String extension : new String[]{
                 ArchiveStreamFactory.AR,
                 ArchiveStreamFactory.ARJ,
                 ArchiveStreamFactory.CPIO,
@@ -246,26 +246,26 @@ public class ArchiveStreamFactoryTest {
         try {
             ArchiveStreamFactory.detect(new BufferedInputStream(new ByteArrayInputStream(new byte[0])));
             fail("shouldn't be able to detect empty stream");
-        } catch (ArchiveException e) {
+        } catch (final ArchiveException e) {
             assertEquals("No Archiver found for the stream signature", e.getMessage());
         }
 
         try {
             ArchiveStreamFactory.detect(null);
             fail("shouldn't be able to detect null stream");
-        } catch (IllegalArgumentException e) {
+        } catch (final IllegalArgumentException e) {
             assertEquals("Stream must not be null.", e.getMessage());
         }
 
         try {
             ArchiveStreamFactory.detect(new BufferedInputStream(new MockEvilInputStream()));
             fail("Expected ArchiveException");
-        } catch (ArchiveException e) {
+        } catch (final ArchiveException e) {
             assertEquals("IOException while reading signature.", e.getMessage());
         }
     }
 
-    private String detect(String resource) throws IOException, ArchiveException {
+    private String detect(final String resource) throws IOException, ArchiveException {
         try(InputStream in = new BufferedInputStream(new FileInputStream(
                 getFile(resource)))) {
             return ArchiveStreamFactory.detect(in);
diff --git a/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java b/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java
index a2f47ba..147b372 100644
--- a/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java
@@ -60,7 +60,7 @@ public class LongPathTest extends AbstractTestCase {
     static {
         try {
             ARCDIR = new File(CLASSLOADER.getResource("longpath").toURI());
-        } catch (URISyntaxException e) {
+        } catch (final URISyntaxException e) {
             throw new RuntimeException(e);
         }
     }
diff --git a/src/test/java/org/apache/commons/compress/archivers/LongSymLinkTest.java b/src/test/java/org/apache/commons/compress/archivers/LongSymLinkTest.java
index b4d0cf4..882fa39 100644
--- a/src/test/java/org/apache/commons/compress/archivers/LongSymLinkTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/LongSymLinkTest.java
@@ -60,7 +60,7 @@ public class LongSymLinkTest extends AbstractTestCase {
     static {
         try {
             ARCDIR = new File(CLASSLOADER.getResource("longsymlink").toURI());
-        } catch (URISyntaxException e) {
+        } catch (final URISyntaxException e) {
             throw new RuntimeException(e);
         }
     }
diff --git a/src/test/java/org/apache/commons/compress/archivers/SevenZTestCase.java b/src/test/java/org/apache/commons/compress/archivers/SevenZTestCase.java
index 9f33978..d593379 100644
--- a/src/test/java/org/apache/commons/compress/archivers/SevenZTestCase.java
+++ b/src/test/java/org/apache/commons/compress/archivers/SevenZTestCase.java
@@ -153,7 +153,7 @@ public class SevenZTestCase extends AbstractTestCase {
         }
     }
 
-    private void singleByteReadConsistentlyReturnsMinusOneAtEof(SevenZFile archive) throws Exception {
+    private void singleByteReadConsistentlyReturnsMinusOneAtEof(final SevenZFile archive) throws Exception {
         SevenZArchiveEntry entry = archive.getNextEntry();
         entry = archive.getNextEntry();
         readFully(archive);
@@ -196,7 +196,7 @@ public class SevenZTestCase extends AbstractTestCase {
         }
     }
 
-    private void multiByteReadConsistentlyReturnsMinusOneAtEof(SevenZFile archive) throws Exception {
+    private void multiByteReadConsistentlyReturnsMinusOneAtEof(final SevenZFile archive) throws Exception {
         final byte[] buf = new byte[2];
         SevenZArchiveEntry entry = archive.getNextEntry();
         entry = archive.getNextEntry();
diff --git a/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java b/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
index dcb61fd..12b2212 100644
--- a/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
+++ b/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
@@ -148,7 +148,7 @@ public final class ZipTestCase extends AbstractTestCase {
 
                 ZipArchiveEntry entry;
                 while ((entry = (ZipArchiveEntry) inputStream.getNextEntry()) != null) {
-                    byte[] result = new byte[(int) entry.getSize()];
+                    final byte[] result = new byte[(int) entry.getSize()];
                     IOUtils.readFully(inputStream, result);
                     results.add(result);
                 }
@@ -258,7 +258,7 @@ public final class ZipTestCase extends AbstractTestCase {
                     while ((nestedEntry = (ZipArchiveEntry) nestedIn.getNextEntry()) != null) {
                         results.add(nestedEntry.getName());
                     }
-                } catch (ZipException ex) {
+                } catch (final ZipException ex) {
                     // expected since you cannot create a final ArchiveInputStream from test3.xml
                     expectedExceptions.add(ex);
                 }
@@ -505,8 +505,8 @@ public final class ZipTestCase extends AbstractTestCase {
         ZipArchiveOutputStream zos = null;
         ZipFile zf = null;
         FileInputStream fis = null;
-        File tmpDir = tmp[0];
-        File tmpFile = tmp[1];
+        final File tmpDir = tmp[0];
+        final File tmpFile = tmp[1];
         try {
             archive = File.createTempFile("test.", ".zip", tmpDir);
             archive.deleteOnExit();
@@ -553,9 +553,9 @@ public final class ZipTestCase extends AbstractTestCase {
         ZipArchiveOutputStream zos = null;
         ZipFile zf = null;
         FileInputStream fis = null;
-        File tmpDir = tmp[0];
-        File tmpFile = tmp[1];
-        Path tmpFilePath = tmpFile.toPath();
+        final File tmpDir = tmp[0];
+        final File tmpFile = tmp[1];
+        final Path tmpFilePath = tmpFile.toPath();
         try {
             archiveFile = File.createTempFile("test.", ".zip", tmpDir);
             archivePath = archiveFile.toPath();
@@ -644,7 +644,7 @@ public final class ZipTestCase extends AbstractTestCase {
 
     @Test
     public void inputStreamStatisticsOfZipBombExcel() throws IOException, ArchiveException {
-        Map<String, List<Long>> expected = new HashMap<String, List<Long>>() {{
+        final Map<String, List<Long>> expected = new HashMap<String, List<Long>>() {{
             put("[Content_Types].xml", Arrays.asList(8390036L, 8600L));
             put("xl/worksheets/sheet1.xml", Arrays.asList(1348L, 508L));
         }};
@@ -653,7 +653,7 @@ public final class ZipTestCase extends AbstractTestCase {
 
     @Test
     public void inputStreamStatisticsForImplodedEntry() throws IOException, ArchiveException {
-        Map<String, List<Long>> expected = new HashMap<String, List<Long>>() {{
+        final Map<String, List<Long>> expected = new HashMap<String, List<Long>>() {{
             put("LICENSE.TXT", Arrays.asList(11560L, 4131L));
         }};
         testInputStreamStatistics("imploding-8Kdict-3trees.zip", expected);
@@ -661,7 +661,7 @@ public final class ZipTestCase extends AbstractTestCase {
 
     @Test
     public void inputStreamStatisticsForShrunkEntry() throws IOException, ArchiveException {
-        Map<String, List<Long>> expected = new HashMap<String, List<Long>>() {{
+        final Map<String, List<Long>> expected = new HashMap<String, List<Long>>() {{
             put("TEST1.XML", Arrays.asList(76L, 66L));
             put("TEST2.XML", Arrays.asList(81L, 76L));
         }};
@@ -670,7 +670,7 @@ public final class ZipTestCase extends AbstractTestCase {
 
     @Test
     public void inputStreamStatisticsForStoredEntry() throws IOException, ArchiveException {
-        Map<String, List<Long>> expected = new HashMap<String, List<Long>>() {{
+        final Map<String, List<Long>> expected = new HashMap<String, List<Long>>() {{
             put("test.txt", Arrays.asList(5L, 5L));
         }};
         testInputStreamStatistics("COMPRESS-264.zip", expected);
@@ -678,7 +678,7 @@ public final class ZipTestCase extends AbstractTestCase {
 
     @Test
     public void inputStreamStatisticsForBzip2Entry() throws IOException, ArchiveException {
-        Map<String, List<Long>> expected = new HashMap<String, List<Long>>() {{
+        final Map<String, List<Long>> expected = new HashMap<String, List<Long>>() {{
             put("lots-of-as", Arrays.asList(42L, 39L));
         }};
         testInputStreamStatistics("bzip2-zip.zip", expected);
@@ -686,7 +686,7 @@ public final class ZipTestCase extends AbstractTestCase {
 
     @Test
     public void inputStreamStatisticsForDeflate64Entry() throws IOException, ArchiveException {
-        Map<String, List<Long>> expected = new HashMap<String, List<Long>>() {{
+        final Map<String, List<Long>> expected = new HashMap<String, List<Long>>() {{
             put("input2", Arrays.asList(3072L, 2111L));
         }};
         testInputStreamStatistics("COMPRESS-380/COMPRESS-380.zip", expected);
@@ -704,14 +704,14 @@ public final class ZipTestCase extends AbstractTestCase {
 
     @Test(expected = IOException.class)
     public void buildSplitZipWithSegmentAlreadyExistThrowsException() throws IOException {
-        File directoryToZip = getFilesToZip();
-        File outputZipFile = new File(dir, "splitZip.zip");
-        long splitSize = 100 * 1024L; /* 100 KB */
+        final File directoryToZip = getFilesToZip();
+        final File outputZipFile = new File(dir, "splitZip.zip");
+        final long splitSize = 100 * 1024L; /* 100 KB */
         try (final ZipArchiveOutputStream zipArchiveOutputStream = new ZipArchiveOutputStream(outputZipFile,
             splitSize)) {
 
             // create a file that has the same name of one of the created split segments
-            File sameNameFile = new File(dir, "splitZip.z01");
+            final File sameNameFile = new File(dir, "splitZip.z01");
             sameNameFile.createNewFile();
 
             addFilesToZip(zipArchiveOutputStream, directoryToZip);
@@ -720,24 +720,24 @@ public final class ZipTestCase extends AbstractTestCase {
 
     @Test
     public void buildSplitZipTest() throws IOException {
-        File directoryToZip = getFilesToZip();
+        final File directoryToZip = getFilesToZip();
         createTestSplitZipSegments();
 
-        File lastFile = new File(dir, "splitZip.zip");
+        final File lastFile = new File(dir, "splitZip.zip");
         try (SeekableByteChannel channel = ZipSplitReadOnlySeekableByteChannel.buildFromLastSplitSegment(lastFile);
             InputStream inputStream = Channels.newInputStream(channel);
             ZipArchiveInputStream splitInputStream = new ZipArchiveInputStream(inputStream,
                 StandardCharsets.UTF_8.toString(), true, false, true)) {
 
             ArchiveEntry entry;
-            int filesNum = countNonDirectories(directoryToZip);
+            final int filesNum = countNonDirectories(directoryToZip);
             int filesCount = 0;
             while ((entry = splitInputStream.getNextEntry()) != null) {
                 if (entry.isDirectory()) {
                     continue;
                 }
                 // compare all files one by one
-                File fileToCompare = new File(entry.getName());
+                final File fileToCompare = new File(entry.getName());
                 try (InputStream inputStreamToCompare = new FileInputStream(fileToCompare)) {
                     assertArrayEquals(IOUtils.toByteArray(splitInputStream),
                         IOUtils.toByteArray(inputStreamToCompare));
@@ -749,7 +749,7 @@ public final class ZipTestCase extends AbstractTestCase {
         }
     }
 
-    private void testInputStreamStatistics(String fileName, Map<String, List<Long>> expectedStatistics)
+    private void testInputStreamStatistics(final String fileName, final Map<String, List<Long>> expectedStatistics)
         throws IOException, ArchiveException {
         final File input = getFile(fileName);
 
@@ -775,12 +775,12 @@ public final class ZipTestCase extends AbstractTestCase {
         }
 
         // compare statistics of stream / file access
-        for (Map.Entry<String,List<List<Long>>> me : actualStatistics.entrySet()) {
+        for (final Map.Entry<String,List<List<Long>>> me : actualStatistics.entrySet()) {
             assertEquals("Mismatch of stats for: " + me.getKey(),
                          me.getValue().get(0), me.getValue().get(1));
         }
 
-        for (Map.Entry<String, List<Long>> me : expectedStatistics.entrySet()) {
+        for (final Map.Entry<String, List<Long>> me : expectedStatistics.entrySet()) {
             assertEquals("Mismatch of stats with expected value for: " + me.getKey(),
                 me.getValue(), actualStatistics.get(me.getKey()).get(0));
         }
@@ -805,9 +805,9 @@ public final class ZipTestCase extends AbstractTestCase {
     }
 
     private File getFilesToZip() throws IOException {
-        File originalZipFile = getFile("COMPRESS-477/split_zip_created_by_zip/zip_to_compare_created_by_zip.zip");
+        final File originalZipFile = getFile("COMPRESS-477/split_zip_created_by_zip/zip_to_compare_created_by_zip.zip");
         try (ZipFile zipFile = new ZipFile(originalZipFile)) {
-            Enumeration<ZipArchiveEntry> zipEntries = zipFile.getEntries();
+            final Enumeration<ZipArchiveEntry> zipEntries = zipFile.getEntries();
             ZipArchiveEntry zipEntry;
             File outputFile;
             byte[] buffer;
@@ -838,22 +838,22 @@ public final class ZipTestCase extends AbstractTestCase {
     }
 
     private void createTestSplitZipSegments() throws IOException {
-        File directoryToZip = getFilesToZip();
-        File outputZipFile = new File(dir, "splitZip.zip");
-        long splitSize = 100 * 1024L; /* 100 KB */
+        final File directoryToZip = getFilesToZip();
+        final File outputZipFile = new File(dir, "splitZip.zip");
+        final long splitSize = 100 * 1024L; /* 100 KB */
         try (final ZipArchiveOutputStream zipArchiveOutputStream = new ZipArchiveOutputStream(outputZipFile,
             splitSize)) {
             addFilesToZip(zipArchiveOutputStream, directoryToZip);
         }
     }
 
-    private void addFilesToZip(ZipArchiveOutputStream zipArchiveOutputStream, File fileToAdd) throws IOException {
+    private void addFilesToZip(final ZipArchiveOutputStream zipArchiveOutputStream, final File fileToAdd) throws IOException {
         if (fileToAdd.isDirectory()) {
-            for (File file : fileToAdd.listFiles()) {
+            for (final File file : fileToAdd.listFiles()) {
                 addFilesToZip(zipArchiveOutputStream, file);
             }
         } else {
-            ZipArchiveEntry zipArchiveEntry = new ZipArchiveEntry(fileToAdd.getPath());
+            final ZipArchiveEntry zipArchiveEntry = new ZipArchiveEntry(fileToAdd.getPath());
             zipArchiveEntry.setMethod(ZipEntry.DEFLATED);
 
             zipArchiveOutputStream.putArchiveEntry(zipArchiveEntry);
@@ -864,13 +864,13 @@ public final class ZipTestCase extends AbstractTestCase {
         }
     }
 
-    private int countNonDirectories(File file) {
+    private int countNonDirectories(final File file) {
         if(!file.isDirectory()) {
             return 1;
         }
 
         int result = 0;
-        for (File fileInDirectory : file.listFiles()) {
+        for (final File fileInDirectory : file.listFiles()) {
             result += countNonDirectories(fileInDirectory);
         }
 
diff --git a/src/test/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStreamTest.java
index f620a6b..e8514e4 100644
--- a/src/test/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStreamTest.java
@@ -64,7 +64,7 @@ public class ArArchiveInputStreamTest extends AbstractTestCase {
     public void singleByteReadConsistentlyReturnsMinusOneAtEof() throws Exception {
         try (FileInputStream in = new FileInputStream(getFile("bla.ar"));
              ArArchiveInputStream archive = new ArArchiveInputStream(in)) {
-            ArchiveEntry e = archive.getNextEntry();
+            final ArchiveEntry e = archive.getNextEntry();
             IOUtils.toByteArray(archive);
             assertEquals(-1, archive.read());
             assertEquals(-1, archive.read());
@@ -73,10 +73,10 @@ public class ArArchiveInputStreamTest extends AbstractTestCase {
 
     @Test
     public void multiByteReadConsistentlyReturnsMinusOneAtEof() throws Exception {
-        byte[] buf = new byte[2];
+        final byte[] buf = new byte[2];
         try (FileInputStream in = new FileInputStream(getFile("bla.ar"));
              ArArchiveInputStream archive = new ArArchiveInputStream(in)) {
-            ArchiveEntry e = archive.getNextEntry();
+            final ArchiveEntry e = archive.getNextEntry();
             IOUtils.toByteArray(archive);
             assertEquals(-1, archive.read(buf));
             assertEquals(-1, archive.read(buf));
@@ -98,12 +98,12 @@ public class ArArchiveInputStreamTest extends AbstractTestCase {
             };
 
             try (ArArchiveInputStream archiveInputStream = new ArArchiveInputStream(simpleInputStream)) {
-                ArArchiveEntry entry1 = archiveInputStream.getNextArEntry();
+                final ArArchiveEntry entry1 = archiveInputStream.getNextArEntry();
                 assertThat(entry1, not(nullValue()));
                 assertThat(entry1.getName(), equalTo("test1.xml"));
                 assertThat(entry1.getLength(), equalTo(610L));
 
-                ArArchiveEntry entry2 = archiveInputStream.getNextArEntry();
+                final ArArchiveEntry entry2 = archiveInputStream.getNextArEntry();
                 assertThat(entry2.getName(), equalTo("test2.xml"));
                 assertThat(entry2.getLength(), equalTo(82L));
 
diff --git a/src/test/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStreamTest.java
index 6c0950c..6a31b07 100644
--- a/src/test/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStreamTest.java
@@ -87,7 +87,7 @@ public class ArjArchiveInputStreamTest extends AbstractTestCase {
     public void singleByteReadConsistentlyReturnsMinusOneAtEof() throws Exception {
         try (FileInputStream in = new FileInputStream(getFile("bla.arj"));
              ArjArchiveInputStream archive = new ArjArchiveInputStream(in)) {
-            ArchiveEntry e = archive.getNextEntry();
+            final ArchiveEntry e = archive.getNextEntry();
             IOUtils.toByteArray(archive);
             assertEquals(-1, archive.read());
             assertEquals(-1, archive.read());
@@ -96,10 +96,10 @@ public class ArjArchiveInputStreamTest extends AbstractTestCase {
 
     @Test
     public void multiByteReadConsistentlyReturnsMinusOneAtEof() throws Exception {
-        byte[] buf = new byte[2];
+        final byte[] buf = new byte[2];
         try (FileInputStream in = new FileInputStream(getFile("bla.arj"));
              ArjArchiveInputStream archive = new ArjArchiveInputStream(in)) {
-            ArchiveEntry e = archive.getNextEntry();
+            final ArchiveEntry e = archive.getNextEntry();
             IOUtils.toByteArray(archive);
             assertEquals(-1, archive.read(buf));
             assertEquals(-1, archive.read(buf));
diff --git a/src/test/java/org/apache/commons/compress/archivers/arj/CoverageTest.java b/src/test/java/org/apache/commons/compress/archivers/arj/CoverageTest.java
index 6dd9f70..29f27df 100644
--- a/src/test/java/org/apache/commons/compress/archivers/arj/CoverageTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/arj/CoverageTest.java
@@ -27,7 +27,7 @@ public class CoverageTest {
 
     @Test
     public void testHostOsInstance() {
-        HostOs hostOs = new HostOs();
+        final HostOs hostOs = new HostOs();
         assertNotNull(hostOs);
     }
     @Test
@@ -39,7 +39,7 @@ public class CoverageTest {
     }
     @Test
     public void testCallLFHToString() {
-        LocalFileHeader lfh = new LocalFileHeader();
+        final LocalFileHeader lfh = new LocalFileHeader();
         assertNotNull(lfh.toString());
     }
 
diff --git a/src/test/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStreamTest.java
index efb5394..8f72a2a 100644
--- a/src/test/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStreamTest.java
@@ -87,7 +87,7 @@ public class CpioArchiveInputStreamTest extends AbstractTestCase {
     public void singleByteReadConsistentlyReturnsMinusOneAtEof() throws Exception {
         try (FileInputStream in = new FileInputStream(getFile("bla.cpio"));
              CpioArchiveInputStream archive = new CpioArchiveInputStream(in)) {
-            ArchiveEntry e = archive.getNextEntry();
+            final ArchiveEntry e = archive.getNextEntry();
             IOUtils.toByteArray(archive);
             assertEquals(-1, archive.read());
             assertEquals(-1, archive.read());
@@ -96,10 +96,10 @@ public class CpioArchiveInputStreamTest extends AbstractTestCase {
 
     @Test
     public void multiByteReadConsistentlyReturnsMinusOneAtEof() throws Exception {
-        byte[] buf = new byte[2];
+        final byte[] buf = new byte[2];
         try (FileInputStream in = new FileInputStream(getFile("bla.cpio"));
              CpioArchiveInputStream archive = new CpioArchiveInputStream(in)) {
-            ArchiveEntry e = archive.getNextEntry();
+            final ArchiveEntry e = archive.getNextEntry();
             IOUtils.toByteArray(archive);
             assertEquals(-1, archive.read(buf));
             assertEquals(-1, archive.read(buf));
diff --git a/src/test/java/org/apache/commons/compress/archivers/cpio/CpioArchiveTest.java b/src/test/java/org/apache/commons/compress/archivers/cpio/CpioArchiveTest.java
index 0dac090..128289b 100644
--- a/src/test/java/org/apache/commons/compress/archivers/cpio/CpioArchiveTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/cpio/CpioArchiveTest.java
@@ -44,7 +44,7 @@ public class CpioArchiveTest {
 
     private final short format;
 
-    public CpioArchiveTest(short format) {
+    public CpioArchiveTest(final short format) {
         this.format = format;
     }
 
@@ -53,7 +53,7 @@ public class CpioArchiveTest {
         try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
             try (CpioArchiveOutputStream os = new CpioArchiveOutputStream(baos, format, CpioConstants.BLOCK_SIZE,
                 "UTF-16LE")) {
-                CpioArchiveEntry entry = new CpioArchiveEntry(format, "T\u00e4st.txt", 4);
+                final CpioArchiveEntry entry = new CpioArchiveEntry(format, "T\u00e4st.txt", 4);
                 if (format == CpioConstants.FORMAT_NEW_CRC) {
                     entry.setChksum(10);
                 }
@@ -64,7 +64,7 @@ public class CpioArchiveTest {
             baos.close();
             try (ByteArrayInputStream bin = new ByteArrayInputStream(baos.toByteArray());
                  CpioArchiveInputStream in = new CpioArchiveInputStream(bin, "UTF-16LE")) {
-                CpioArchiveEntry entry = (CpioArchiveEntry) in.getNextEntry();
+                final CpioArchiveEntry entry = (CpioArchiveEntry) in.getNextEntry();
                 Assert.assertNotNull(entry);
                 Assert.assertEquals("T\u00e4st.txt", entry.getName());
                 Assert.assertArrayEquals(new byte[] { 1, 2, 3, 4 }, IOUtils.toByteArray(in));
diff --git a/src/test/java/org/apache/commons/compress/archivers/cpio/CpioUtilTest.java b/src/test/java/org/apache/commons/compress/archivers/cpio/CpioUtilTest.java
index 5b1edb5..359b6a1 100644
--- a/src/test/java/org/apache/commons/compress/archivers/cpio/CpioUtilTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/cpio/CpioUtilTest.java
@@ -73,7 +73,7 @@ public class CpioUtilTest {
     @Test(expected = UnsupportedOperationException.class)
     public void testByteArray2longThrowsUnsupportedOperationException() {
 
-        byte[] byteArray = new byte[1];
+        final byte[] byteArray = new byte[1];
 
         CpioUtil.byteArray2long(byteArray, true);
 
diff --git a/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStreamTest.java
index 89f6f15..49ee9a1 100644
--- a/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStreamTest.java
@@ -74,7 +74,7 @@ public class DumpArchiveInputStreamTest extends AbstractTestCase {
     public void singleByteReadConsistentlyReturnsMinusOneAtEof() throws Exception {
         try (FileInputStream in = new FileInputStream(getFile("bla.dump"));
              DumpArchiveInputStream archive = new DumpArchiveInputStream(in)) {
-            ArchiveEntry e = archive.getNextEntry();
+            final ArchiveEntry e = archive.getNextEntry();
             IOUtils.toByteArray(archive);
             assertEquals(-1, archive.read());
             assertEquals(-1, archive.read());
@@ -83,10 +83,10 @@ public class DumpArchiveInputStreamTest extends AbstractTestCase {
 
     @Test
     public void multiByteReadConsistentlyReturnsMinusOneAtEof() throws Exception {
-        byte[] buf = new byte[2];
+        final byte[] buf = new byte[2];
         try (FileInputStream in = new FileInputStream(getFile("bla.dump"));
              DumpArchiveInputStream archive = new DumpArchiveInputStream(in)) {
-            ArchiveEntry e = archive.getNextEntry();
+            final ArchiveEntry e = archive.getNextEntry();
             IOUtils.toByteArray(archive);
             assertEquals(-1, archive.read(buf));
             assertEquals(-1, archive.read(buf));
diff --git a/src/test/java/org/apache/commons/compress/archivers/examples/ExpanderTest.java b/src/test/java/org/apache/commons/compress/archivers/examples/ExpanderTest.java
index 69f1031..c8f978a 100644
--- a/src/test/java/org/apache/commons/compress/archivers/examples/ExpanderTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/examples/ExpanderTest.java
@@ -129,8 +129,8 @@ public class ExpanderTest extends AbstractTestCase {
 
     @Test
     public void fileCantEscapeDoubleDotPathWithSimilarSibling() throws IOException, ArchiveException {
-        String sibling = resultDir.getName() + "x";
-        File s = new File(resultDir.getParentFile(), sibling);
+        final String sibling = resultDir.getName() + "x";
+        final File s = new File(resultDir.getParentFile(), sibling);
         Assume.assumeFalse(s.exists());
         s.mkdirs();
         Assume.assumeTrue(s.exists());
@@ -149,7 +149,7 @@ public class ExpanderTest extends AbstractTestCase {
 
     private void setup7z() throws IOException, ArchiveException {
         archive = new File(dir, "test.7z");
-        File dummy = new File(dir, "x");
+        final File dummy = new File(dir, "x");
         try (OutputStream o = Files.newOutputStream(dummy.toPath())) {
             o.write(new byte[14]);
         }
@@ -172,7 +172,7 @@ public class ExpanderTest extends AbstractTestCase {
 
     private void setupZip() throws IOException, ArchiveException {
         archive = new File(dir, "test.zip");
-        File dummy = new File(dir, "x");
+        final File dummy = new File(dir, "x");
         try (OutputStream o = Files.newOutputStream(dummy.toPath())) {
             o.write(new byte[14]);
         }
@@ -194,9 +194,9 @@ public class ExpanderTest extends AbstractTestCase {
         }
     }
 
-    private void setupZip(String entry) throws IOException, ArchiveException {
+    private void setupZip(final String entry) throws IOException, ArchiveException {
         archive = new File(dir, "test.zip");
-        File dummy = new File(dir, "x");
+        final File dummy = new File(dir, "x");
         try (OutputStream o = Files.newOutputStream(dummy.toPath())) {
             o.write(new byte[14]);
         }
@@ -217,11 +217,11 @@ public class ExpanderTest extends AbstractTestCase {
         assertHelloWorld("a/b/c/e.txt", "2");
     }
 
-    private void assertHelloWorld(String fileName, String suffix) throws IOException {
+    private void assertHelloWorld(final String fileName, final String suffix) throws IOException {
         Assert.assertTrue(fileName + " does not exist", new File(resultDir, fileName).isFile());
-        byte[] expected = ("Hello, world " + suffix).getBytes(StandardCharsets.UTF_8);
+        final byte[] expected = ("Hello, world " + suffix).getBytes(StandardCharsets.UTF_8);
         try (InputStream is = Files.newInputStream(new File(resultDir, fileName).toPath())) {
-            byte[] actual = IOUtils.toByteArray(is);
+            final byte[] actual = IOUtils.toByteArray(is);
             Assert.assertArrayEquals(expected, actual);
         }
     }
diff --git a/src/test/java/org/apache/commons/compress/archivers/examples/ParameterizedArchiverTest.java b/src/test/java/org/apache/commons/compress/archivers/examples/ParameterizedArchiverTest.java
index 5eb457e..5ab7be9 100644
--- a/src/test/java/org/apache/commons/compress/archivers/examples/ParameterizedArchiverTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/examples/ParameterizedArchiverTest.java
@@ -63,7 +63,7 @@ public class ParameterizedArchiverTest extends AbstractTestCase {
     private final String format;
     private File target;
 
-    public ParameterizedArchiverTest(String format) {
+    public ParameterizedArchiverTest(final String format) {
         this.format = format;
     }
 
@@ -71,7 +71,7 @@ public class ParameterizedArchiverTest extends AbstractTestCase {
     @Override
     public void setUp() throws Exception {
         super.setUp();
-        File c = new File(dir, "a/b/c");
+        final File c = new File(dir, "a/b/c");
         c.mkdirs();
         try (OutputStream os = Files.newOutputStream(new File(dir, "a/b/d.txt").toPath())) {
             os.write("Hello, world 1".getBytes(StandardCharsets.UTF_8));
@@ -120,7 +120,7 @@ public class ParameterizedArchiverTest extends AbstractTestCase {
              ArchiveInputStream ais = ArchiveStreamFactory.DEFAULT.createArchiveInputStream(format, bis)) {
             assertDir("a", ais.getNextEntry());
             assertDir("a/b", ais.getNextEntry());
-            ArchiveEntry n = ais.getNextEntry();
+            final ArchiveEntry n = ais.getNextEntry();
             Assert.assertNotNull(n);
             // File.list may return a/b/c or a/b/d.txt first
             if (n.getName().endsWith("/")) {
@@ -135,19 +135,19 @@ public class ParameterizedArchiverTest extends AbstractTestCase {
         }
     }
 
-    private void assertDir(String expectedName, ArchiveEntry entry) {
+    private void assertDir(final String expectedName, final ArchiveEntry entry) {
         Assert.assertNotNull(expectedName + " does not exists", entry);
         Assert.assertEquals(expectedName + "/", entry.getName());
         Assert.assertTrue(expectedName + " is not a directory", entry.isDirectory());
     }
 
-    private void assertHelloWorld(String expectedName, String suffix, ArchiveEntry entry, InputStream is)
+    private void assertHelloWorld(final String expectedName, final String suffix, final ArchiveEntry entry, final InputStream is)
         throws IOException {
         Assert.assertNotNull(expectedName + " does not exists", entry);
         Assert.assertEquals(expectedName, entry.getName());
         Assert.assertFalse(expectedName + " is a directory", entry.isDirectory());
-        byte[] expected = ("Hello, world " + suffix).getBytes(StandardCharsets.UTF_8);
-        byte[] actual = IOUtils.toByteArray(is);
+        final byte[] expected = ("Hello, world " + suffix).getBytes(StandardCharsets.UTF_8);
+        final byte[] actual = IOUtils.toByteArray(is);
         Assert.assertArrayEquals(expected, actual);
     }
 }
diff --git a/src/test/java/org/apache/commons/compress/archivers/examples/ParameterizedExpanderTest.java b/src/test/java/org/apache/commons/compress/archivers/examples/ParameterizedExpanderTest.java
index a7abe1b..e66cb89 100644
--- a/src/test/java/org/apache/commons/compress/archivers/examples/ParameterizedExpanderTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/examples/ParameterizedExpanderTest.java
@@ -60,7 +60,7 @@ public class ParameterizedExpanderTest extends AbstractTestCase {
     private final String format;
     private File archive;
 
-    public ParameterizedExpanderTest(String format) {
+    public ParameterizedExpanderTest(final String format) {
         this.format = format;
     }
 
@@ -69,7 +69,7 @@ public class ParameterizedExpanderTest extends AbstractTestCase {
     public void setUp() throws Exception {
         super.setUp();
         archive = new File(dir, "test." + format);
-        File dummy = new File(dir, "x");
+        final File dummy = new File(dir, "x");
         try (OutputStream o = Files.newOutputStream(dummy.toPath())) {
             o.write(new byte[14]);
         }
@@ -144,11 +144,11 @@ public class ParameterizedExpanderTest extends AbstractTestCase {
         assertHelloWorld("a/b/c/e.txt", "2");
     }
 
-    private void assertHelloWorld(String fileName, String suffix) throws IOException {
+    private void assertHelloWorld(final String fileName, final String suffix) throws IOException {
         Assert.assertTrue(fileName + " does not exist", new File(resultDir, fileName).isFile());
-        byte[] expected = ("Hello, world " + suffix).getBytes(StandardCharsets.UTF_8);
+        final byte[] expected = ("Hello, world " + suffix).getBytes(StandardCharsets.UTF_8);
         try (InputStream is = Files.newInputStream(new File(resultDir, fileName).toPath())) {
-            byte[] actual = IOUtils.toByteArray(is);
+            final byte[] actual = IOUtils.toByteArray(is);
             Assert.assertArrayEquals(expected, actual);
         }
     }
diff --git a/src/test/java/org/apache/commons/compress/archivers/examples/SevenZArchiverTest.java b/src/test/java/org/apache/commons/compress/archivers/examples/SevenZArchiverTest.java
index 635c899..5a61914 100644
--- a/src/test/java/org/apache/commons/compress/archivers/examples/SevenZArchiverTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/examples/SevenZArchiverTest.java
@@ -43,7 +43,7 @@ public class SevenZArchiverTest extends AbstractTestCase {
     @Override
     public void setUp() throws Exception {
         super.setUp();
-        File c = new File(dir, "a/b/c");
+        final File c = new File(dir, "a/b/c");
         c.mkdirs();
         try (OutputStream os = Files.newOutputStream(new File(dir, "a/b/d.txt").toPath())) {
             os.write("Hello, world 1".getBytes(StandardCharsets.UTF_8));
@@ -89,7 +89,7 @@ public class SevenZArchiverTest extends AbstractTestCase {
         try (SevenZFile z = new SevenZFile(target)) {
             assertDir("a", z.getNextEntry());
             assertDir("a/b", z.getNextEntry());
-            ArchiveEntry n = z.getNextEntry();
+            final ArchiveEntry n = z.getNextEntry();
             Assert.assertNotNull(n);
             // File.list may return a/b/c or a/b/d.txt first
             if (n.getName().endsWith("/")) {
@@ -104,19 +104,19 @@ public class SevenZArchiverTest extends AbstractTestCase {
         }
     }
 
-    private void assertDir(String expectedName, ArchiveEntry entry) {
+    private void assertDir(final String expectedName, final ArchiveEntry entry) {
         Assert.assertNotNull(expectedName + " does not exists", entry);
         Assert.assertEquals(expectedName + "/", entry.getName());
         Assert.assertTrue(expectedName + " is not a directory", entry.isDirectory());
     }
 
-    private void assertHelloWorld(String expectedName, String suffix, ArchiveEntry entry, SevenZFile z)
+    private void assertHelloWorld(final String expectedName, final String suffix, final ArchiveEntry entry, final SevenZFile z)
         throws IOException {
         Assert.assertNotNull(expectedName + " does not exists", entry);
         Assert.assertEquals(expectedName, entry.getName());
         Assert.assertFalse(expectedName + " is a directory", entry.isDirectory());
-        byte[] expected = ("Hello, world " + suffix).getBytes(StandardCharsets.UTF_8);
-        byte[] actual = new byte[expected.length];
+        final byte[] expected = ("Hello, world " + suffix).getBytes(StandardCharsets.UTF_8);
+        final byte[] actual = new byte[expected.length];
         Assert.assertEquals(actual.length, z.read(actual));
         Assert.assertEquals(-1, z.read());
         Assert.assertArrayEquals(expected, actual);
diff --git a/src/test/java/org/apache/commons/compress/archivers/jar/JarMarkerTest.java b/src/test/java/org/apache/commons/compress/archivers/jar/JarMarkerTest.java
index 507a814..7f59fa1 100644
--- a/src/test/java/org/apache/commons/compress/archivers/jar/JarMarkerTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/jar/JarMarkerTest.java
@@ -27,11 +27,11 @@ import org.junit.Test;
 public class JarMarkerTest {
 
     @Test public void testJarMarkerLengthCheck() {
-        JarMarker jarMarker = JarMarker.getInstance();
+        final JarMarker jarMarker = JarMarker.getInstance();
         try {
             jarMarker.parseFromLocalFileData(null,0,1);
             fail("should have thrown exception due to length of 1");
-        } catch (ZipException e) {
+        } catch (final ZipException e) {
 
         }
     }
diff --git a/src/test/java/org/apache/commons/compress/archivers/sevenz/AES256SHA256DecoderTest.java b/src/test/java/org/apache/commons/compress/archivers/sevenz/AES256SHA256DecoderTest.java
index 9b00bb8..7495929 100644
--- a/src/test/java/org/apache/commons/compress/archivers/sevenz/AES256SHA256DecoderTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/sevenz/AES256SHA256DecoderTest.java
@@ -40,13 +40,13 @@ public class AES256SHA256DecoderTest {
     @Test
     public void testDecodeWithNonEmptyString() throws IOException {
 
-        AES256SHA256Decoder aES256SHA256Decoder = new AES256SHA256Decoder();
-        BufferedInputStream bufferedInputStream = new BufferedInputStream(null, 3138);
-        Coder coder = new Coder();
-        byte[] byteArray = new byte[8];
+        final AES256SHA256Decoder aES256SHA256Decoder = new AES256SHA256Decoder();
+        final BufferedInputStream bufferedInputStream = new BufferedInputStream(null, 3138);
+        final Coder coder = new Coder();
+        final byte[] byteArray = new byte[8];
         byteArray[1] = (byte) (-72);
         coder.properties = byteArray;
-        InputStream inputStream = aES256SHA256Decoder.decode("x", bufferedInputStream, 3138, coder, coder.properties,
+        final InputStream inputStream = aES256SHA256Decoder.decode("x", bufferedInputStream, 3138, coder, coder.properties,
                 Integer.MAX_VALUE);
 
         ObjectInputStream objectInputStream = null;
@@ -54,7 +54,7 @@ public class AES256SHA256DecoderTest {
         try {
             objectInputStream = new ObjectInputStream(inputStream);
             fail("Expecting exception: IOException");
-        } catch(Throwable e) {
+        } catch(final Throwable e) {
             assertEquals("Salt size + IV size too long in x",e.getMessage());
             assertEquals("org.apache.commons.compress.archivers.sevenz.AES256SHA256Decoder$1", e.getStackTrace()[0].getClassName());
         }
diff --git a/src/test/java/org/apache/commons/compress/archivers/sevenz/CoverageTest.java b/src/test/java/org/apache/commons/compress/archivers/sevenz/CoverageTest.java
index 4bfe3c5..fe052aa 100644
--- a/src/test/java/org/apache/commons/compress/archivers/sevenz/CoverageTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/sevenz/CoverageTest.java
@@ -30,12 +30,12 @@ public class CoverageTest {
     }
 
     @Test public void testCLIInstance() {
-        CLI foo = new CLI();
+        final CLI foo = new CLI();
         assertNotNull(foo);
         try {
             CLI.main(new String[]{"/dev/null/not-there"});
             fail("shouldn't be able to list contents of  a file that isn't there");
-        } catch (Exception ignored) {
+        } catch (final Exception ignored) {
 
         }
     }
diff --git a/src/test/java/org/apache/commons/compress/archivers/sevenz/FolderTest.java b/src/test/java/org/apache/commons/compress/archivers/sevenz/FolderTest.java
index 1150b89..1b275bd 100644
--- a/src/test/java/org/apache/commons/compress/archivers/sevenz/FolderTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/sevenz/FolderTest.java
@@ -35,9 +35,9 @@ public class FolderTest {
     @Test
     public void testGetUnpackSizeForCoderOne() {
 
-        Folder folder = new Folder();
-        Coder[] coderArray = new Coder[5];
-        Coder coder = new Coder();
+        final Folder folder = new Folder();
+        final Coder[] coderArray = new Coder[5];
+        final Coder coder = new Coder();
         folder.coders = coderArray;
 
         assertEquals(0L, folder.getUnpackSizeForCoder(coder));
@@ -48,10 +48,10 @@ public class FolderTest {
     @Test
     public void testGetUnpackSizeOne() {
 
-        Folder folder = new Folder();
+        final Folder folder = new Folder();
         folder.totalOutputStreams = 266L;
-        BindPair[] bindPairArray = new BindPair[1];
-        BindPair bindPair = new BindPair();
+        final BindPair[] bindPairArray = new BindPair[1];
+        final BindPair bindPair = new BindPair();
         bindPairArray[0] = bindPair;
         folder.bindPairs = bindPairArray;
         folder.totalOutputStreams = 1L;
@@ -64,7 +64,7 @@ public class FolderTest {
     @Test
     public void testGetUnpackSizeTwo() {
 
-        Folder folder = new Folder();
+        final Folder folder = new Folder();
 
         assertEquals(0L, folder.getUnpackSize());
 
@@ -74,9 +74,9 @@ public class FolderTest {
     @Test
     public void testFindBindPairForInStream() {
 
-        Folder folder = new Folder();
-        BindPair[] bindPairArray = new BindPair[1];
-        BindPair bindPair = new BindPair();
+        final Folder folder = new Folder();
+        final BindPair[] bindPairArray = new BindPair[1];
+        final BindPair bindPair = new BindPair();
         bindPairArray[0] = bindPair;
         folder.bindPairs = bindPairArray;
 
diff --git a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntryTest.java b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntryTest.java
index 29a0097..5bb8eed 100644
--- a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntryTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntryTest.java
@@ -41,8 +41,8 @@ public class SevenZArchiveEntryTest {
 
     @Test
     public void noMethodsIsDifferentFromSomeMethods() {
-        SevenZArchiveEntry z1 = new SevenZArchiveEntry();
-        SevenZArchiveEntry z2 = new SevenZArchiveEntry();
+        final SevenZArchiveEntry z1 = new SevenZArchiveEntry();
+        final SevenZArchiveEntry z2 = new SevenZArchiveEntry();
         z2.setContentMethods(Arrays.asList(new SevenZMethodConfiguration(SevenZMethod.COPY)));
         Assert.assertNotEquals(z1, z2);
         Assert.assertNotEquals(z2, z1);
@@ -50,8 +50,8 @@ public class SevenZArchiveEntryTest {
 
     @Test
     public void oneMethodsIsDifferentFromTwoMethods() {
-        SevenZArchiveEntry z1 = new SevenZArchiveEntry();
-        SevenZArchiveEntry z2 = new SevenZArchiveEntry();
+        final SevenZArchiveEntry z1 = new SevenZArchiveEntry();
+        final SevenZArchiveEntry z2 = new SevenZArchiveEntry();
         z1.setContentMethods(Arrays.asList(new SevenZMethodConfiguration(SevenZMethod.COPY)));
         z2.setContentMethods(Arrays.asList(new SevenZMethodConfiguration(SevenZMethod.DELTA_FILTER),
                                            new SevenZMethodConfiguration(SevenZMethod.LZMA2)));
@@ -61,8 +61,8 @@ public class SevenZArchiveEntryTest {
 
     @Test
     public void sameMethodsYieldEqualEntries() {
-        SevenZArchiveEntry z1 = new SevenZArchiveEntry();
-        SevenZArchiveEntry z2 = new SevenZArchiveEntry();
+        final SevenZArchiveEntry z1 = new SevenZArchiveEntry();
+        final SevenZArchiveEntry z2 = new SevenZArchiveEntry();
         z1.setContentMethods(Arrays.asList(new SevenZMethodConfiguration(SevenZMethod.DELTA_FILTER),
                                            new SevenZMethodConfiguration(SevenZMethod.LZMA2)));
         z2.setContentMethods(Arrays.asList(new SevenZMethodConfiguration(SevenZMethod.DELTA_FILTER),
@@ -73,8 +73,8 @@ public class SevenZArchiveEntryTest {
 
     @Test
     public void methodOrderMattersInEquals() {
-        SevenZArchiveEntry z1 = new SevenZArchiveEntry();
-        SevenZArchiveEntry z2 = new SevenZArchiveEntry();
+        final SevenZArchiveEntry z1 = new SevenZArchiveEntry();
+        final SevenZArchiveEntry z2 = new SevenZArchiveEntry();
         z1.setContentMethods(Arrays.asList(new SevenZMethodConfiguration(SevenZMethod.LZMA2),
                                            new SevenZMethodConfiguration(SevenZMethod.DELTA_FILTER)));
         z2.setContentMethods(Arrays.asList(new SevenZMethodConfiguration(SevenZMethod.DELTA_FILTER),
@@ -85,9 +85,9 @@ public class SevenZArchiveEntryTest {
 
     @Test
     public void methodConfigurationMattersInEquals() {
-        SevenZArchiveEntry z1 = new SevenZArchiveEntry();
-        SevenZArchiveEntry z2 = new SevenZArchiveEntry();
-        SevenZArchiveEntry z3 = new SevenZArchiveEntry();
+        final SevenZArchiveEntry z1 = new SevenZArchiveEntry();
+        final SevenZArchiveEntry z2 = new SevenZArchiveEntry();
+        final SevenZArchiveEntry z3 = new SevenZArchiveEntry();
         z1.setContentMethods(Arrays.asList(new SevenZMethodConfiguration(SevenZMethod.LZMA2, 1)));
         z2.setContentMethods(Arrays.asList(new SevenZMethodConfiguration(SevenZMethod.LZMA2, 2)));
         z3.setContentMethods(Arrays.asList(new SevenZMethodConfiguration(SevenZMethod.LZMA2, 2)));
diff --git a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
index 9b85f75..29f9599 100644
--- a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
@@ -384,7 +384,7 @@ public class SevenZFileTest extends AbstractTestCase {
      */
     @Test
     public void handlesEmptyArchiveWithFilesInfo() throws Exception {
-        File f = new File(dir, "empty.7z");
+        final File f = new File(dir, "empty.7z");
         try (SevenZOutputFile s = new SevenZOutputFile(f)) {
         }
         try (SevenZFile z = new SevenZFile(f)) {
@@ -423,11 +423,11 @@ public class SevenZFileTest extends AbstractTestCase {
                     "111111111111111111111111111000101011\n" +
                     "111111111111111111111111111000101011";
 
-            for(SevenZArchiveEntry entry : sevenZFile.getEntries()) {
+            for(final SevenZArchiveEntry entry : sevenZFile.getEntries()) {
                 if(entry.getName().equals("commons-compress-1.7-src/src/test/resources/test.txt")) {
                     final byte[] contents = new byte[(int) entry.getSize()];
                     int off = 0;
-                    InputStream inputStream = sevenZFile.getInputStream(entry);
+                    final InputStream inputStream = sevenZFile.getInputStream(entry);
                     while (off < contents.length) {
                         final int bytesRead = inputStream.read(contents, off, contents.length - off);
                         assert (bytesRead >= 0);
@@ -475,12 +475,12 @@ public class SevenZFileTest extends AbstractTestCase {
             sevenZFile.getNextEntry();
             sevenZFile.getNextEntry();
 
-            for(SevenZArchiveEntry entry : sevenZFile.getEntries()) {
+            for(final SevenZArchiveEntry entry : sevenZFile.getEntries()) {
                 // commons-compress-1.7-src/src/test/resources/test.txt
                 if(entry.getName().equals("commons-compress-1.7-src/src/test/resources/longsymlink/files.txt")) {
                     contents = new byte[(int) entry.getSize()];
                     off = 0;
-                    InputStream inputStream = sevenZFile.getInputStream(entry);
+                    final InputStream inputStream = sevenZFile.getInputStream(entry);
                     while (off < contents.length) {
                         final int bytesRead = inputStream.read(contents, off, contents.length - off);
                         assert (bytesRead >= 0);
@@ -534,8 +534,8 @@ public class SevenZFileTest extends AbstractTestCase {
             }
 
             // read the next entry and jump back using random access
-            SevenZArchiveEntry entryAfterTestTxtEntry = sevenZFile.getNextEntry();
-            byte[] entryAfterTestTxtEntryContents = new byte[(int) entryAfterTestTxtEntry.getSize()];
+            final SevenZArchiveEntry entryAfterTestTxtEntry = sevenZFile.getNextEntry();
+            final byte[] entryAfterTestTxtEntryContents = new byte[(int) entryAfterTestTxtEntry.getSize()];
             int off = 0;
             while (off < entryAfterTestTxtEntryContents.length) {
                 final int bytesRead = sevenZFile.read(entryAfterTestTxtEntryContents, off, entryAfterTestTxtEntryContents.length - off);
@@ -544,7 +544,7 @@ public class SevenZFileTest extends AbstractTestCase {
             }
 
             // jump backwards
-            byte[] contents = new byte[(int) testTxtEntry.getSize()];
+            final byte[] contents = new byte[(int) testTxtEntry.getSize()];
             try (InputStream inputStream = sevenZFile.getInputStream(testTxtEntry)) {
                 off = 0;
                 while (off < contents.length) {
@@ -557,8 +557,8 @@ public class SevenZFileTest extends AbstractTestCase {
             }
 
             // then read the next entry using getNextEntry
-            SevenZArchiveEntry nextTestTxtEntry = sevenZFile.getNextEntry();
-            byte[] nextTestContents = new byte[(int) nextTestTxtEntry.getSize()];
+            final SevenZArchiveEntry nextTestTxtEntry = sevenZFile.getNextEntry();
+            final byte[] nextTestContents = new byte[(int) nextTestTxtEntry.getSize()];
             off = 0;
             while (off < nextTestContents.length) {
                 final int bytesRead = sevenZFile.read(nextTestContents, off, nextTestContents.length - off);
@@ -587,22 +587,22 @@ public class SevenZFileTest extends AbstractTestCase {
                     "111111111111111111111111111000101011";
 
             SevenZArchiveEntry testTxtEntry = null;
-            Iterable<SevenZArchiveEntry> entries = sevenZFile.getEntries();
-            Iterator<SevenZArchiveEntry> iter = entries.iterator();
+            final Iterable<SevenZArchiveEntry> entries = sevenZFile.getEntries();
+            final Iterator<SevenZArchiveEntry> iter = entries.iterator();
             while(iter.hasNext()) {
                 testTxtEntry = iter.next();
                 if (testTxtEntry.getName().equals("commons-compress-1.7-src/src/test/resources/test.txt")) {
                     break;
                 }
             }
-            SevenZArchiveEntry firstEntry = sevenZFile.getNextEntry();
+            final SevenZArchiveEntry firstEntry = sevenZFile.getNextEntry();
             // only read some of the data of the first entry
             byte[] contents = new byte[(int) firstEntry.getSize()/2];
             sevenZFile.read(contents);
 
             // and the third entry
             sevenZFile.getNextEntry();
-            SevenZArchiveEntry thirdEntry = sevenZFile.getNextEntry();
+            final SevenZArchiveEntry thirdEntry = sevenZFile.getNextEntry();
             contents = new byte[(int) thirdEntry.getSize()/2];
             sevenZFile.read(contents);
 
@@ -647,7 +647,7 @@ public class SevenZFileTest extends AbstractTestCase {
                 }
             }
 
-            byte[] contents = new byte[(int) testTxtEntry.getSize()];
+            final byte[] contents = new byte[(int) testTxtEntry.getSize()];
             int numberOfReads = 10;
             while (numberOfReads-- > 0) {
                 try (InputStream inputStream = sevenZFile.getInputStream(testTxtEntry)) {
@@ -668,7 +668,7 @@ public class SevenZFileTest extends AbstractTestCase {
     public void extractNonExistSpecifiedFile() throws Exception {
         try (SevenZFile sevenZFile = new SevenZFile(getFile("COMPRESS-256.7z"));
             SevenZFile anotherSevenZFile = new SevenZFile(getFile("bla.7z"))) {
-            for (SevenZArchiveEntry nonExistEntry : anotherSevenZFile.getEntries()) {
+            for (final SevenZArchiveEntry nonExistEntry : anotherSevenZFile.getEntries()) {
                 thrown.expect(IllegalArgumentException.class);
                 sevenZFile.getInputStream(nonExistEntry);
             }
@@ -678,9 +678,9 @@ public class SevenZFileTest extends AbstractTestCase {
     @Test
     public void retrieveInputStreamForAllEntriesMultipleTimes() throws IOException {
         try (SevenZFile sevenZFile = new SevenZFile(getFile("bla.7z"))) {
-            for (SevenZArchiveEntry entry : sevenZFile.getEntries()) {
-                byte[] firstRead = IOUtils.toByteArray(sevenZFile.getInputStream(entry));
-                byte[] secondRead = IOUtils.toByteArray(sevenZFile.getInputStream(entry));
+            for (final SevenZArchiveEntry entry : sevenZFile.getEntries()) {
+                final byte[] firstRead = IOUtils.toByteArray(sevenZFile.getInputStream(entry));
+                final byte[] secondRead = IOUtils.toByteArray(sevenZFile.getInputStream(entry));
                 assertArrayEquals(firstRead, secondRead);
             }
         }
@@ -691,7 +691,7 @@ public class SevenZFileTest extends AbstractTestCase {
         try (final SevenZOutputFile out = new SevenZOutputFile(new File(dir, "test.7z"))) {
             final Path inputFile = Files.createTempFile("SevenZTestTemp", "");
 
-            SevenZArchiveEntry entry = out.createArchiveEntry(inputFile.toFile(), "test.txt");
+            final SevenZArchiveEntry entry = out.createArchiveEntry(inputFile.toFile(), "test.txt");
             out.putArchiveEntry(entry);
             out.write("Test".getBytes(StandardCharsets.UTF_8));
             out.closeArchiveEntry();
@@ -700,9 +700,9 @@ public class SevenZFileTest extends AbstractTestCase {
         }
 
         try (SevenZFile sevenZFile = new SevenZFile(new File(dir, "test.7z"))) {
-            for (SevenZArchiveEntry entry : sevenZFile.getEntries()) {
-                byte[] firstRead = IOUtils.toByteArray(sevenZFile.getInputStream(entry));
-                byte[] secondRead = IOUtils.toByteArray(sevenZFile.getInputStream(entry));
+            for (final SevenZArchiveEntry entry : sevenZFile.getEntries()) {
+                final byte[] firstRead = IOUtils.toByteArray(sevenZFile.getInputStream(entry));
+                final byte[] secondRead = IOUtils.toByteArray(sevenZFile.getInputStream(entry));
                 assertArrayEquals(firstRead, secondRead);
             }
         }
@@ -720,7 +720,7 @@ public class SevenZFileTest extends AbstractTestCase {
         }
     }
 
-    private void test7zUnarchive(SevenZFile sevenZFile, final SevenZMethod m) throws Exception {
+    private void test7zUnarchive(final SevenZFile sevenZFile, final SevenZMethod m) throws Exception {
         SevenZArchiveEntry entry = sevenZFile.getNextEntry();
         assertEquals("test1.xml", entry.getName());
         assertEquals(m, entry.getContentMethods().iterator().next().getMethod());
diff --git a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZNativeHeapTest.java b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZNativeHeapTest.java
index 04065c0..7a2e6c0 100644
--- a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZNativeHeapTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZNativeHeapTest.java
@@ -63,7 +63,7 @@ public class SevenZNativeHeapTest extends AbstractTestCase {
 
         private final Inflater inflater;
 
-        public DelegatingInflater(Inflater inflater) {
+        public DelegatingInflater(final Inflater inflater) {
             this.inflater = inflater;
         }
         AtomicBoolean isEnded = new AtomicBoolean();
@@ -75,22 +75,22 @@ public class SevenZNativeHeapTest extends AbstractTestCase {
         }
 
         @Override
-        public void setInput(byte[] b, int off, int len) {
+        public void setInput(final byte[] b, final int off, final int len) {
             inflater.setInput(b, off, len);
         }
 
         @Override
-        public void setInput(byte[] b) {
+        public void setInput(final byte[] b) {
             inflater.setInput(b);
         }
 
         @Override
-        public void setDictionary(byte[] b, int off, int len) {
+        public void setDictionary(final byte[] b, final int off, final int len) {
             inflater.setDictionary(b, off, len);
         }
 
         @Override
-        public void setDictionary(byte[] b) {
+        public void setDictionary(final byte[] b) {
             inflater.setDictionary(b);
         }
 
@@ -115,12 +115,12 @@ public class SevenZNativeHeapTest extends AbstractTestCase {
         }
 
         @Override
-        public int inflate(byte[] b, int off, int len) throws DataFormatException {
+        public int inflate(final byte[] b, final int off, final int len) throws DataFormatException {
             return inflater.inflate(b, off, len);
         }
 
         @Override
-        public int inflate(byte[] b) throws DataFormatException {
+        public int inflate(final byte[] b) throws DataFormatException {
             return inflater.inflate(b);
         }
 
@@ -160,7 +160,7 @@ public class SevenZNativeHeapTest extends AbstractTestCase {
 
         private final Deflater deflater;
 
-        public DelegatingDeflater(Deflater deflater) {
+        public DelegatingDeflater(final Deflater deflater) {
             this.deflater = deflater;
         }
 
@@ -173,32 +173,32 @@ public class SevenZNativeHeapTest extends AbstractTestCase {
         }
 
         @Override
-        public void setInput(byte[] b, int off, int len) {
+        public void setInput(final byte[] b, final int off, final int len) {
             deflater.setInput(b, off, len);
         }
 
         @Override
-        public void setInput(byte[] b) {
+        public void setInput(final byte[] b) {
             deflater.setInput(b);
         }
 
         @Override
-        public void setDictionary(byte[] b, int off, int len) {
+        public void setDictionary(final byte[] b, final int off, final int len) {
             deflater.setDictionary(b, off, len);
         }
 
         @Override
-        public void setDictionary(byte[] b) {
+        public void setDictionary(final byte[] b) {
             deflater.setDictionary(b);
         }
 
         @Override
-        public void setStrategy(int strategy) {
+        public void setStrategy(final int strategy) {
             deflater.setStrategy(strategy);
         }
 
         @Override
-        public void setLevel(int level) {
+        public void setLevel(final int level) {
             deflater.setLevel(level);
         }
 
@@ -218,17 +218,17 @@ public class SevenZNativeHeapTest extends AbstractTestCase {
         }
 
         @Override
-        public int deflate(byte[] b, int off, int len) {
+        public int deflate(final byte[] b, final int off, final int len) {
             return deflater.deflate(b, off, len);
         }
 
         @Override
-        public int deflate(byte[] b) {
+        public int deflate(final byte[] b) {
             return deflater.deflate(b);
         }
 
         @Override
-        public int deflate(byte[] b, int off, int len, int flush) {
+        public int deflate(final byte[] b, final int off, final int len, final int flush) {
             return deflater.deflate(b, off, len, flush);
         }
 
diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/SparseFilesTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/SparseFilesTest.java
index 4fa3899..336df29 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/SparseFilesTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/SparseFilesTest.java
@@ -49,7 +49,7 @@ public class SparseFilesTest extends AbstractTestCase {
             assertFalse(ae.isPaxGNUSparse());
             assertFalse(tin.canReadEntryData(ae));
 
-            List<TarArchiveStructSparse> sparseHeaders = ae.getSparseHeaders();
+            final List<TarArchiveStructSparse> sparseHeaders = ae.getSparseHeaders();
             assertEquals(3, sparseHeaders.size());
 
             assertEquals(0, sparseHeaders.get(0).getOffset());
@@ -153,7 +153,7 @@ public class SparseFilesTest extends AbstractTestCase {
             assertArrayEquals(IOUtils.toByteArray(tin),
                 IOUtils.toByteArray(sparseFileInputStream));
 
-            List<TarArchiveStructSparse> sparseHeaders = ae.getSparseHeaders();
+            final List<TarArchiveStructSparse> sparseHeaders = ae.getSparseHeaders();
             assertEquals(7, sparseHeaders.size());
 
             assertEquals(0, sparseHeaders.get(0).getOffset());
@@ -218,7 +218,7 @@ public class SparseFilesTest extends AbstractTestCase {
         assertFalse(ae.isOldGNUSparse());
         assertFalse(tin.canReadEntryData(ae));
 
-        List<TarArchiveStructSparse> sparseHeaders = ae.getSparseHeaders();
+        final List<TarArchiveStructSparse> sparseHeaders = ae.getSparseHeaders();
         assertEquals(3, sparseHeaders.size());
 
         assertEquals(0, sparseHeaders.get(0).getOffset());
@@ -231,14 +231,14 @@ public class SparseFilesTest extends AbstractTestCase {
         assertEquals(0, sparseHeaders.get(2).getNumbytes());
     }
 
-    private InputStream extractTarAndGetInputStream(File tarFile, String sparseFileName) throws IOException, InterruptedException {
-        ProcessBuilder pb = new ProcessBuilder("tar", "-xf", tarFile.getPath(), "-C", resultDir.getPath());
+    private InputStream extractTarAndGetInputStream(final File tarFile, final String sparseFileName) throws IOException, InterruptedException {
+        final ProcessBuilder pb = new ProcessBuilder("tar", "-xf", tarFile.getPath(), "-C", resultDir.getPath());
         pb.redirectErrorStream(true);
-        Process process = pb.start();
+        final Process process = pb.start();
         // wait until the extract finishes
         assertEquals(new String(IOUtils.toByteArray(process.getInputStream())), 0, process.waitFor());
 
-        for (File file : resultDir.listFiles()) {
+        for (final File file : resultDir.listFiles()) {
             if (file.getName().equals(sparseFileName)) {
                 return new FileInputStream(file);
             }
diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveEntryTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveEntryTest.java
index 4bf20c0..688afa3 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveEntryTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveEntryTest.java
@@ -131,8 +131,8 @@ public class TarArchiveEntryTest implements TarConstants {
     }
 
     @Test public void testExtraPaxHeaders() throws IOException {
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        TarArchiveOutputStream tos = new TarArchiveOutputStream(bos);
+        final ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        final TarArchiveOutputStream tos = new TarArchiveOutputStream(bos);
 
         TarArchiveEntry entry = new TarArchiveEntry("./weasels");
         entry.addPaxHeader("APACHE.mustelida","true");
@@ -152,7 +152,7 @@ public class TarArchiveEntryTest implements TarConstants {
         assertNotEquals("should have extra headers before clear",0,entry.getExtraPaxHeaders().size());
         entry.clearExtraPaxHeaders();
         assertEquals("extra headers should be empty after clear",0,entry.getExtraPaxHeaders().size());
-        TarArchiveInputStream tis = new TarArchiveInputStream(new ByteArrayInputStream(bos.toByteArray()));
+        final TarArchiveInputStream tis = new TarArchiveInputStream(new ByteArrayInputStream(bos.toByteArray()));
         entry = tis.getNextTarEntry();
         assertNotNull("couldn't get entry",entry);
 
@@ -202,7 +202,7 @@ public class TarArchiveEntryTest implements TarConstants {
 
     @Test
     public void getFileFromNonFileEntry() {
-        TarArchiveEntry entry = new TarArchiveEntry("test.txt");
+        final TarArchiveEntry entry = new TarArchiveEntry("test.txt");
         assertNull(entry.getFile());
         assertNull(entry.getPath());
     }
@@ -210,7 +210,7 @@ public class TarArchiveEntryTest implements TarConstants {
     @Test
     public void testLinuxFileInformationFromFile() throws IOException {
         assumeTrue("Information is only available on linux", OS.equals("linux"));
-        TarArchiveEntry entry = new TarArchiveEntry(getFile("test1.xml"));
+        final TarArchiveEntry entry = new TarArchiveEntry(getFile("test1.xml"));
         assertNotEquals(0, entry.getLongUserId());
         assertNotEquals(0, entry.getLongGroupId());
         assertNotEquals("", entry.getUserName());
@@ -219,7 +219,7 @@ public class TarArchiveEntryTest implements TarConstants {
     @Test
     public void testLinuxFileInformationFromPath() throws IOException {
         assumeTrue("Information is only available on linux", OS.equals("linux"));
-        TarArchiveEntry entry = new TarArchiveEntry(getPath("test1.xml"));
+        final TarArchiveEntry entry = new TarArchiveEntry(getPath("test1.xml"));
         assertNotEquals(0, entry.getLongUserId());
         assertNotEquals(0, entry.getLongGroupId());
         assertNotEquals("", entry.getUserName());
@@ -228,14 +228,14 @@ public class TarArchiveEntryTest implements TarConstants {
     @Test
     public void testWindowsFileInformationFromFile() throws IOException {
         assumeTrue("Information should only be checked on Windows", OS.startsWith("windows"));
-        TarArchiveEntry entry = new TarArchiveEntry(getFile("test1.xml"));
+        final TarArchiveEntry entry = new TarArchiveEntry(getFile("test1.xml"));
         assertNotEquals("", entry.getUserName());
     }
 
     @Test
     public void testWindowsFileInformationFromPath() throws IOException {
         assumeTrue("Information should only be checked on Windows", OS.startsWith("windows"));
-        TarArchiveEntry entry = new TarArchiveEntry(getPath("test1.xml"));
+        final TarArchiveEntry entry = new TarArchiveEntry(getPath("test1.xml"));
         assertNotEquals("", entry.getUserName());
     }
 
diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
index 9a99691..8218af5 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
@@ -322,7 +322,7 @@ public class TarArchiveInputStreamTest extends AbstractTestCase {
             final TarArchiveEntry entry = is.getNextTarEntry();
             assertEquals("package/package.json", entry.getName());
             assertEquals(is.getCurrentEntry(),entry);
-            TarArchiveEntry weaselEntry = new TarArchiveEntry(entry.getName());
+            final TarArchiveEntry weaselEntry = new TarArchiveEntry(entry.getName());
             weaselEntry.setSize(entry.getSize());
             is.setCurrentEntry(weaselEntry);
             assertEquals(entry,is.getCurrentEntry());
@@ -332,7 +332,7 @@ public class TarArchiveInputStreamTest extends AbstractTestCase {
                is.setCurrentEntry(null);
                is.read();
                fail("should abort because current entry is nulled");
-            }  catch(IllegalStateException e) {
+            }  catch(final IllegalStateException e) {
                 // expected
             }
             is.setCurrentEntry(entry);
@@ -356,7 +356,7 @@ public class TarArchiveInputStreamTest extends AbstractTestCase {
     public void singleByteReadConsistentlyReturnsMinusOneAtEof() throws Exception {
         try (FileInputStream in = new FileInputStream(getFile("bla.tar"));
              TarArchiveInputStream archive = new TarArchiveInputStream(in)) {
-            ArchiveEntry e = archive.getNextEntry();
+            final ArchiveEntry e = archive.getNextEntry();
             IOUtils.toByteArray(archive);
             assertEquals(-1, archive.read());
             assertEquals(-1, archive.read());
@@ -365,10 +365,10 @@ public class TarArchiveInputStreamTest extends AbstractTestCase {
 
     @Test
     public void multiByteReadConsistentlyReturnsMinusOneAtEof() throws Exception {
-        byte[] buf = new byte[2];
+        final byte[] buf = new byte[2];
         try (FileInputStream in = new FileInputStream(getFile("bla.tar"));
              TarArchiveInputStream archive = new TarArchiveInputStream(in)) {
-            ArchiveEntry e = archive.getNextEntry();
+            final ArchiveEntry e = archive.getNextEntry();
             IOUtils.toByteArray(archive);
             assertEquals(-1, archive.read(buf));
             assertEquals(-1, archive.read(buf));
@@ -380,7 +380,7 @@ public class TarArchiveInputStreamTest extends AbstractTestCase {
         final String rootPath = dir.getAbsolutePath();
         final String dirDirectory = "COMPRESS-509";
         final int count = 100;
-        File root = new File(rootPath + "/" + dirDirectory);
+        final File root = new File(rootPath + "/" + dirDirectory);
         root.mkdirs();
         for (int i = 1; i < count; i++) {
             // -----------------------
@@ -390,21 +390,21 @@ public class TarArchiveInputStreamTest extends AbstractTestCase {
             for (int j = 0; j < i; j++) {
                 subDir += "a";
             }
-            File dir = new File(rootPath + "/" + dirDirectory, "/" + subDir);
+            final File dir = new File(rootPath + "/" + dirDirectory, "/" + subDir);
             dir.mkdir();
 
             // -----------------------
             // tar these dirs
             // -----------------------
-            String fileName = "/" + dirDirectory + "/" + subDir;
-            File tarF = new File(rootPath + "/tar" + i + ".tar");
-            FileOutputStream dest = new FileOutputStream(tarF);
-            TarArchiveOutputStream out = new TarArchiveOutputStream(new BufferedOutputStream(dest));
+            final String fileName = "/" + dirDirectory + "/" + subDir;
+            final File tarF = new File(rootPath + "/tar" + i + ".tar");
+            final FileOutputStream dest = new FileOutputStream(tarF);
+            final TarArchiveOutputStream out = new TarArchiveOutputStream(new BufferedOutputStream(dest));
             out.setBigNumberMode(TarArchiveOutputStream.BIGNUMBER_STAR);
             out.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU);
 
-            File file = new File(rootPath, fileName);
-            TarArchiveEntry entry = new TarArchiveEntry(file);
+            final File file = new File(rootPath, fileName);
+            final TarArchiveEntry entry = new TarArchiveEntry(file);
             entry.setName(fileName);
             out.putArchiveEntry(entry);
             out.closeArchiveEntry();
@@ -414,8 +414,8 @@ public class TarArchiveInputStreamTest extends AbstractTestCase {
             // -----------------------
             // untar these tars
             // -----------------------
-            InputStream is = new FileInputStream(tarF);
-            TarArchiveInputStream debInputStream = (TarArchiveInputStream) ArchiveStreamFactory.DEFAULT
+            final InputStream is = new FileInputStream(tarF);
+            final TarArchiveInputStream debInputStream = (TarArchiveInputStream) ArchiveStreamFactory.DEFAULT
                     .createArchiveInputStream("tar", is);
             TarArchiveEntry outEntry;
             while ((outEntry = (TarArchiveEntry) debInputStream.getNextEntry()) != null) {
diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java
index f50c6de..b74c58d 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java
@@ -626,17 +626,17 @@ public class TarArchiveOutputStreamTest extends AbstractTestCase {
     @SuppressWarnings("deprecation")
     @Test public void testRecordSize() throws IOException {
         try {
-            TarArchiveOutputStream tos =
+            final TarArchiveOutputStream tos =
                 new TarArchiveOutputStream(new ByteArrayOutputStream(),512,511);
             fail("should have rejected recordSize of 511");
-        } catch(IllegalArgumentException e) {
+        } catch(final IllegalArgumentException e) {
             // expected;
         }
         try {
-            TarArchiveOutputStream tos =
+            final TarArchiveOutputStream tos =
                 new TarArchiveOutputStream(new ByteArrayOutputStream(),512,511,null);
             fail("should have rejected recordSize of 511");
-        } catch(IllegalArgumentException e) {
+        } catch(final IllegalArgumentException e) {
             // expected;
         }
         try (TarArchiveOutputStream tos = new TarArchiveOutputStream(new ByteArrayOutputStream(),
@@ -650,7 +650,7 @@ public class TarArchiveOutputStreamTest extends AbstractTestCase {
     }
     @Test
     public void testBlockSizes() throws Exception {
-        String fileName = "/test1.xml";
+        final String fileName = "/test1.xml";
         byte[] contents = getResourceContents(fileName);
         testPadding(TarConstants.DEFAULT_BLKSIZE, fileName, contents); // USTAR / pre-pax
         testPadding(5120, fileName, contents); // PAX default
@@ -659,13 +659,13 @@ public class TarArchiveOutputStreamTest extends AbstractTestCase {
         try {
             testPadding(511, fileName, contents);    // don't specify a block size -> use minimum length
             fail("should have thrown an illegal argument exception");
-        } catch (IllegalArgumentException e) {
+        } catch (final IllegalArgumentException e) {
             //expected
         }
         try {
             testPadding(0, fileName, contents);    // don't specify a block size -> use minimum length
             fail("should have thrown an illegal argument exception");
-        } catch (IllegalArgumentException e) {
+        } catch (final IllegalArgumentException e) {
             //expected
         }
         // test with "content" that is an exact multiple of record length
@@ -674,7 +674,7 @@ public class TarArchiveOutputStreamTest extends AbstractTestCase {
         testPadding(TarConstants.DEFAULT_BLKSIZE, fileName, contents);
     }
 
-    private void testPadding(int blockSize, String fileName, byte[] contents) throws IOException {
+    private void testPadding(int blockSize, final String fileName, final byte[] contents) throws IOException {
         final File f = File.createTempFile("commons-compress-padding", ".tar");
         f.deleteOnExit();
         final FileOutputStream fos = new FileOutputStream(f);
@@ -692,15 +692,15 @@ public class TarArchiveOutputStreamTest extends AbstractTestCase {
         tos.write(contents);
         tos.closeArchiveEntry();
         tos.close();
-        int fileRecordsSize = (int) Math.ceil((double) contents.length / 512) * 512;
+        final int fileRecordsSize = (int) Math.ceil((double) contents.length / 512) * 512;
         final int headerSize = 512;
         final int endOfArchiveSize = 1024;
-        int unpaddedSize = headerSize + fileRecordsSize + endOfArchiveSize;
-        int paddedSize = (int) Math.ceil((double)unpaddedSize/blockSize)*blockSize;
+        final int unpaddedSize = headerSize + fileRecordsSize + endOfArchiveSize;
+        final int paddedSize = (int) Math.ceil((double)unpaddedSize/blockSize)*blockSize;
         assertEquals(paddedSize, f.length());
     }
 
-    private byte[] getResourceContents(String name) throws IOException {
+    private byte[] getResourceContents(final String name) throws IOException {
         ByteArrayOutputStream bos;
         try (InputStream resourceAsStream = getClass().getResourceAsStream(name)) {
             bos = new ByteArrayOutputStream();
@@ -709,35 +709,35 @@ public class TarArchiveOutputStreamTest extends AbstractTestCase {
         return bos.toByteArray();
     }
     @Test public void testPutGlobalPaxHeaderEntry() throws IOException {
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        TarArchiveOutputStream tos = new TarArchiveOutputStream(bos);
-        int pid = 73;
-        int globCount = 1;
-        byte lfPaxGlobalExtendedHeader = TarConstants.LF_PAX_GLOBAL_EXTENDED_HEADER;
-        TarArchiveEntry globalHeader = new TarArchiveEntry("/tmp/GlobalHead." + pid + "." + globCount,
+        final ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        final TarArchiveOutputStream tos = new TarArchiveOutputStream(bos);
+        final int pid = 73;
+        final int globCount = 1;
+        final byte lfPaxGlobalExtendedHeader = TarConstants.LF_PAX_GLOBAL_EXTENDED_HEADER;
+        final TarArchiveEntry globalHeader = new TarArchiveEntry("/tmp/GlobalHead." + pid + "." + globCount,
             lfPaxGlobalExtendedHeader);
         globalHeader.addPaxHeader("SCHILLY.xattr.user.org.apache.weasels","global-weasels");
         tos.putArchiveEntry(globalHeader);
         TarArchiveEntry entry = new TarArchiveEntry("message");
-        String x = "If at first you don't succeed, give up";
+        final String x = "If at first you don't succeed, give up";
         entry.setSize(x.length());
         tos.putArchiveEntry(entry);
         tos.write(x.getBytes());
         tos.closeArchiveEntry();
         entry = new TarArchiveEntry("counter-message");
-        String y = "Nothing succeeds like excess";
+        final String y = "Nothing succeeds like excess";
         entry.setSize(y.length());
         entry.addPaxHeader("SCHILLY.xattr.user.org.apache.weasels.species","unknown");
         tos.putArchiveEntry(entry);
         tos.write(y.getBytes());
         tos.closeArchiveEntry();
         tos.close();
-        TarArchiveInputStream in = new TarArchiveInputStream(new ByteArrayInputStream(bos.toByteArray()));
+        final TarArchiveInputStream in = new TarArchiveInputStream(new ByteArrayInputStream(bos.toByteArray()));
         TarArchiveEntry entryIn = in.getNextTarEntry();
         assertNotNull(entryIn);
         assertEquals("message",entryIn.getName());
         assertEquals("global-weasels",entryIn.getExtraPaxHeader("SCHILLY.xattr.user.org.apache.weasels"));
-        Reader reader = new InputStreamReader(in);
+        final Reader reader = new InputStreamReader(in);
         for(int i=0;i<x.length();i++) {
             assertEquals(x.charAt(i),reader.read());
         }
diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/TarMemoryFileSystemTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/TarMemoryFileSystemTest.java
index 6cc64ac..157aef9 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/TarMemoryFileSystemTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/TarMemoryFileSystemTest.java
@@ -43,7 +43,7 @@ public class TarMemoryFileSystemTest {
     @Test
     public void tarFromMemoryFileSystem() throws IOException, ArchiveException {
         try (FileSystem fileSystem = MemoryFileSystemBuilder.newLinux().build()) {
-            Path p = fileSystem.getPath("test.txt");
+            final Path p = fileSystem.getPath("test.txt");
             Files.write(p, "Test".getBytes(StandardCharsets.UTF_8));
 
             final File f = File.createTempFile("commons-compress-memoryfs", ".tar");
@@ -62,7 +62,7 @@ public class TarMemoryFileSystemTest {
     @Test
     public void tarToMemoryFileSystem() throws IOException, ArchiveException {
         try (FileSystem fileSystem = MemoryFileSystemBuilder.newLinux().build()) {
-            Path p = fileSystem.getPath("target.tar");
+            final Path p = fileSystem.getPath("target.tar");
 
             try (final OutputStream out = Files.newOutputStream(p);
                  final ArchiveOutputStream tarOut = ArchiveStreamFactory.DEFAULT.createArchiveOutputStream(ArchiveStreamFactory.TAR, out)) {
@@ -112,7 +112,7 @@ public class TarMemoryFileSystemTest {
 
             try (final InputStream input = Files.newInputStream(target);
                  final TarArchiveInputStream tarIn = new TarArchiveInputStream(input)) {
-                TarArchiveEntry nextTarEntry = tarIn.getNextTarEntry();
+                final TarArchiveEntry nextTarEntry = tarIn.getNextTarEntry();
 
                 assertEquals(user, nextTarEntry.getUserName());
                 assertEquals(group, nextTarEntry.getGroupName());
diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
index bbb2b0f..9b47e32 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
@@ -378,7 +378,7 @@ public class TarUtilsTest {
         try {
             checkRoundTripOctalOrBinary(Long.MAX_VALUE, 8);
             fail("Should throw exception - value is too long to fit buffer of this len");
-        } catch (IllegalArgumentException e) {
+        } catch (final IllegalArgumentException e) {
             assertEquals("Value 9223372036854775807 is too large for 8 byte field.", e.getMessage());
         }
     }
@@ -390,7 +390,7 @@ public class TarUtilsTest {
         final byte [] buffer = new byte[] {
                 ' ', ' ', ' ', ' ', ' ', '0', '1', '0', '0', '0', '0', '0', // sparseOffset
                 ' ', ' ', ' ', ' ', ' ', '0', '1', '1', '1', '0', '0', '0'};
-        TarArchiveStructSparse sparse = TarUtils.parseSparse(buffer, 0);
+        final TarArchiveStructSparse sparse = TarUtils.parseSparse(buffer, 0);
         assertEquals(sparse.getOffset(), expectedOffset);
         assertEquals(sparse.getNumbytes(), expectedNumbytes);
     }
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/BinaryTreeTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/BinaryTreeTest.java
index ae4ba9d..2a96123 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/BinaryTreeTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/BinaryTreeTest.java
@@ -54,21 +54,21 @@ public class BinaryTreeTest {
         try {
             binaryFinary.addLeaf(0,0,0,1);
             fail("should have thrown illegalArgumentException");
-        } catch (IllegalArgumentException e) {
+        } catch (final IllegalArgumentException e) {
         }
 
-        InputStream is = new ByteArrayInputStream(new byte[]{});
+        final InputStream is = new ByteArrayInputStream(new byte[]{});
         try {
             BinaryTree.decode(is,0);
             fail("should have thrown IOException");
-        } catch (IOException e) {
+        } catch (final IOException e) {
 
         }
         binaryFinary = new BinaryTree(4);
         try {
             binaryFinary.read(new BitStream(new ByteArrayInputStream(new byte[] {0})));
             fail("expected read fail");
-        } catch (IOException e) {
+        } catch (final IOException e) {
         }
     }
 }
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/DataDescriptorTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/DataDescriptorTest.java
index b960145..efe6503 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/DataDescriptorTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/DataDescriptorTest.java
@@ -52,47 +52,47 @@ public class DataDescriptorTest {
 
     @Test
     public void writesDataDescriptorForDeflatedEntryOnUnseekableOutput() throws IOException {
-        ByteArrayOutputStream o = new ByteArrayOutputStream();
+        final ByteArrayOutputStream o = new ByteArrayOutputStream();
         try (ZipArchiveOutputStream zos = new ZipArchiveOutputStream(o)) {
             zos.putArchiveEntry(new ZipArchiveEntry("test1.txt"));
             zos.write("foo".getBytes(StandardCharsets.UTF_8));
             zos.closeArchiveEntry();
         }
-        byte[] data = o.toByteArray();
+        final byte[] data = o.toByteArray();
 
-        byte[] versionInLFH = Arrays.copyOfRange(data, 4, 6);
+        final byte[] versionInLFH = Arrays.copyOfRange(data, 4, 6);
         // 2.0 because of DD
         assertArrayEquals(new byte[] { 20, 0 }, versionInLFH);
-        byte[] gpbInLFH = Arrays.copyOfRange(data, 6, 8);
+        final byte[] gpbInLFH = Arrays.copyOfRange(data, 6, 8);
         // DD and EFS flags
         assertArrayEquals(new byte[] { 8, 8 }, gpbInLFH);
-        byte[] crcAndSizedInLFH = Arrays.copyOfRange(data, 14, 26);
+        final byte[] crcAndSizedInLFH = Arrays.copyOfRange(data, 14, 26);
         assertArrayEquals(new byte[12], crcAndSizedInLFH);
 
-        int cdhStart = findCentralDirectory(data);
-        byte[] versionInCDH = Arrays.copyOfRange(data, cdhStart + 6, cdhStart + 8);
+        final int cdhStart = findCentralDirectory(data);
+        final byte[] versionInCDH = Arrays.copyOfRange(data, cdhStart + 6, cdhStart + 8);
         assertArrayEquals(new byte[] { 20, 0 }, versionInCDH);
-        byte[] gpbInCDH = Arrays.copyOfRange(data, cdhStart + 8, cdhStart + 10);
+        final byte[] gpbInCDH = Arrays.copyOfRange(data, cdhStart + 8, cdhStart + 10);
         assertArrayEquals(new byte[] { 8, 8 }, gpbInCDH);
 
-        int ddStart = cdhStart - 16;
+        final int ddStart = cdhStart - 16;
         assertEquals(ZipLong.DD_SIG, new ZipLong(data, ddStart));
-        long crcFromDD = ZipLong.getValue(data, ddStart + 4);
-        long cSizeFromDD = ZipLong.getValue(data, ddStart + 8);
-        long sizeFromDD = ZipLong.getValue(data, ddStart + 12);
+        final long crcFromDD = ZipLong.getValue(data, ddStart + 4);
+        final long cSizeFromDD = ZipLong.getValue(data, ddStart + 8);
+        final long sizeFromDD = ZipLong.getValue(data, ddStart + 12);
         assertEquals(3, sizeFromDD);
 
-        long crcFromCDH = ZipLong.getValue(data, cdhStart + 16);
+        final long crcFromCDH = ZipLong.getValue(data, cdhStart + 16);
         assertEquals(crcFromDD, crcFromCDH);
-        long cSizeFromCDH = ZipLong.getValue(data, cdhStart + 20);
+        final long cSizeFromCDH = ZipLong.getValue(data, cdhStart + 20);
         assertEquals(cSizeFromDD, cSizeFromCDH);
-        long sizeFromCDH = ZipLong.getValue(data, cdhStart + 24);
+        final long sizeFromCDH = ZipLong.getValue(data, cdhStart + 24);
         assertEquals(sizeFromDD, sizeFromCDH);
     }
 
     @Test
     public void doesntWriteDataDescriptorForDeflatedEntryOnSeekableOutput() throws IOException {
-        File f = new File(dir, "test.zip");
+        final File f = new File(dir, "test.zip");
         try (ZipArchiveOutputStream zos = new ZipArchiveOutputStream(f)) {
             zos.putArchiveEntry(new ZipArchiveEntry("test1.txt"));
             zos.write("foo".getBytes(StandardCharsets.UTF_8));
@@ -104,49 +104,49 @@ public class DataDescriptorTest {
             data = IOUtils.toByteArray(fis);
         }
 
-        byte[] versionInLFH = Arrays.copyOfRange(data, 4, 6);
+        final byte[] versionInLFH = Arrays.copyOfRange(data, 4, 6);
         // still 2.0 because of Deflate
         assertArrayEquals(new byte[] { 20, 0 }, versionInLFH);
-        byte[] gpbInLFH = Arrays.copyOfRange(data, 6, 8);
+        final byte[] gpbInLFH = Arrays.copyOfRange(data, 6, 8);
         // no DD but EFS flag
         assertArrayEquals(new byte[] { 0, 8 }, gpbInLFH);
 
-        int cdhStart = findCentralDirectory(data);
-        byte[] versionInCDH = Arrays.copyOfRange(data, cdhStart + 6, cdhStart + 8);
+        final int cdhStart = findCentralDirectory(data);
+        final byte[] versionInCDH = Arrays.copyOfRange(data, cdhStart + 6, cdhStart + 8);
         assertArrayEquals(new byte[] { 20, 0 }, versionInCDH);
-        byte[] gpbInCDH = Arrays.copyOfRange(data, cdhStart + 8, cdhStart + 10);
+        final byte[] gpbInCDH = Arrays.copyOfRange(data, cdhStart + 8, cdhStart + 10);
         assertArrayEquals(new byte[] { 0, 8 }, gpbInCDH);
 
-        int ddStart = cdhStart - 16;
+        final int ddStart = cdhStart - 16;
         assertNotEquals(ZipLong.DD_SIG, new ZipLong(data, ddStart));
-        long crcFromLFH = ZipLong.getValue(data, 14);
-        long cSizeFromLFH = ZipLong.getValue(data, 18);
-        long sizeFromLFH = ZipLong.getValue(data, 22);
+        final long crcFromLFH = ZipLong.getValue(data, 14);
+        final long cSizeFromLFH = ZipLong.getValue(data, 18);
+        final long sizeFromLFH = ZipLong.getValue(data, 22);
         assertEquals(3, sizeFromLFH);
 
-        long crcFromCDH = ZipLong.getValue(data, cdhStart + 16);
+        final long crcFromCDH = ZipLong.getValue(data, cdhStart + 16);
         assertEquals(crcFromLFH, crcFromCDH);
-        long cSizeFromCDH = ZipLong.getValue(data, cdhStart + 20);
+        final long cSizeFromCDH = ZipLong.getValue(data, cdhStart + 20);
         assertEquals(cSizeFromLFH, cSizeFromCDH);
-        long sizeFromCDH = ZipLong.getValue(data, cdhStart + 24);
+        final long sizeFromCDH = ZipLong.getValue(data, cdhStart + 24);
         assertEquals(sizeFromLFH, sizeFromCDH);
     }
 
     @Test
     public void doesntWriteDataDescriptorWhenAddingRawEntries() throws IOException {
-        ByteArrayOutputStream init = new ByteArrayOutputStream();
+        final ByteArrayOutputStream init = new ByteArrayOutputStream();
         try (ZipArchiveOutputStream zos = new ZipArchiveOutputStream(init)) {
             zos.putArchiveEntry(new ZipArchiveEntry("test1.txt"));
             zos.write("foo".getBytes(StandardCharsets.UTF_8));
             zos.closeArchiveEntry();
         }
 
-        File f = new File(dir, "test.zip");
+        final File f = new File(dir, "test.zip");
         try (FileOutputStream fos = new FileOutputStream(f)) {
             fos.write(init.toByteArray());
         }
 
-        ByteArrayOutputStream o = new ByteArrayOutputStream();
+        final ByteArrayOutputStream o = new ByteArrayOutputStream();
         ZipArchiveEntry zae;
         try (ZipFile zf = new ZipFile(f);
              ZipArchiveOutputStream zos = new ZipArchiveOutputStream(o)) {
@@ -154,36 +154,36 @@ public class DataDescriptorTest {
             zos.addRawArchiveEntry(zae, zf.getRawInputStream(zae));
         }
 
-        byte[] data = o.toByteArray();
-        byte[] versionInLFH = Arrays.copyOfRange(data, 4, 6);
+        final byte[] data = o.toByteArray();
+        final byte[] versionInLFH = Arrays.copyOfRange(data, 4, 6);
         // still 2.0 because of Deflate
         assertArrayEquals(new byte[] { 20, 0 }, versionInLFH);
-        byte[] gpbInLFH = Arrays.copyOfRange(data, 6, 8);
+        final byte[] gpbInLFH = Arrays.copyOfRange(data, 6, 8);
         // no DD but EFS flag
         assertArrayEquals(new byte[] { 0, 8 }, gpbInLFH);
 
-        int cdhStart = findCentralDirectory(data);
-        byte[] versionInCDH = Arrays.copyOfRange(data, cdhStart + 6, cdhStart + 8);
+        final int cdhStart = findCentralDirectory(data);
+        final byte[] versionInCDH = Arrays.copyOfRange(data, cdhStart + 6, cdhStart + 8);
         assertArrayEquals(new byte[] { 20, 0 }, versionInCDH);
-        byte[] gpbInCDH = Arrays.copyOfRange(data, cdhStart + 8, cdhStart + 10);
+        final byte[] gpbInCDH = Arrays.copyOfRange(data, cdhStart + 8, cdhStart + 10);
         assertArrayEquals(new byte[] { 0, 8 }, gpbInCDH);
 
-        int ddStart = cdhStart - 16;
+        final int ddStart = cdhStart - 16;
         assertNotEquals(ZipLong.DD_SIG, new ZipLong(data, ddStart));
-        long crcFromLFH = ZipLong.getValue(data, 14);
-        long cSizeFromLFH = ZipLong.getValue(data, 18);
-        long sizeFromLFH = ZipLong.getValue(data, 22);
+        final long crcFromLFH = ZipLong.getValue(data, 14);
+        final long cSizeFromLFH = ZipLong.getValue(data, 18);
+        final long sizeFromLFH = ZipLong.getValue(data, 22);
         assertEquals(3, sizeFromLFH);
 
-        long crcFromCDH = ZipLong.getValue(data, cdhStart + 16);
+        final long crcFromCDH = ZipLong.getValue(data, cdhStart + 16);
         assertEquals(crcFromLFH, crcFromCDH);
-        long cSizeFromCDH = ZipLong.getValue(data, cdhStart + 20);
+        final long cSizeFromCDH = ZipLong.getValue(data, cdhStart + 20);
         assertEquals(cSizeFromLFH, cSizeFromCDH);
-        long sizeFromCDH = ZipLong.getValue(data, cdhStart + 24);
+        final long sizeFromCDH = ZipLong.getValue(data, cdhStart + 24);
         assertEquals(sizeFromLFH, sizeFromCDH);
     }
 
-    private int findCentralDirectory(byte[] data) {
+    private int findCentralDirectory(final byte[] data) {
         // not a ZIP64 archive, no comment, "End of central directory record" at the end
         return (int) ZipLong.getValue(data, data.length - 22 + 16);
     }
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ExplodeSupportTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ExplodeSupportTest.java
index 67fbbb1..ae74057 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ExplodeSupportTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ExplodeSupportTest.java
@@ -104,15 +104,15 @@ public class ExplodeSupportTest {
     @Test
     public void testConstructorThrowsExceptions() {
         try {
-            ExplodingInputStream eis = new  ExplodingInputStream(4095,2,new ByteArrayInputStream(new byte[] {}));
+            final ExplodingInputStream eis = new  ExplodingInputStream(4095,2,new ByteArrayInputStream(new byte[] {}));
             fail("should have failed with illegal argument exception");
-        } catch (IllegalArgumentException e) {
+        } catch (final IllegalArgumentException e) {
         }
 
         try {
-            ExplodingInputStream eis = new  ExplodingInputStream(4096,4,new ByteArrayInputStream(new byte[] {}));
+            final ExplodingInputStream eis = new  ExplodingInputStream(4096,4,new ByteArrayInputStream(new byte[] {}));
             fail("should have failed with illegal argument exception");
-        } catch (IllegalArgumentException e) {
+        } catch (final IllegalArgumentException e) {
         }
 
     }
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ExtraFieldUtilsTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ExtraFieldUtilsTest.java
index 190eccb..ff99112 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ExtraFieldUtilsTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ExtraFieldUtilsTest.java
@@ -105,8 +105,8 @@ public class ExtraFieldUtilsTest implements UnixStat {
     @Test
     public void parseTurnsArrayIndexOutOfBoundsIntoZipException() throws Exception {
         ExtraFieldUtils.register(AiobThrowingExtraField.class);
-        AiobThrowingExtraField f = new AiobThrowingExtraField();
-        byte[] d = new byte[4 + AiobThrowingExtraField.LENGTH];
+        final AiobThrowingExtraField f = new AiobThrowingExtraField();
+        final byte[] d = new byte[4 + AiobThrowingExtraField.LENGTH];
         System.arraycopy(f.getHeaderId().getBytes(), 0, d, 0, 2);
         System.arraycopy(f.getLocalFileDataLength().getBytes(), 0, d, 2, 2);
         System.arraycopy(f.getLocalFileDataData(), 0, d, 4, AiobThrowingExtraField.LENGTH);
@@ -272,13 +272,13 @@ public class ExtraFieldUtilsTest implements UnixStat {
         }
 
         @Override
-        public void parseFromLocalFileData(byte[] buffer, int offset, int length)
+        public void parseFromLocalFileData(final byte[] buffer, final int offset, final int length)
             throws ZipException {
             throw new ArrayIndexOutOfBoundsException();
         }
 
         @Override
-        public void parseFromCentralDirectoryData(byte[] buffer, int offset, int length)
+        public void parseFromCentralDirectoryData(final byte[] buffer, final int offset, final int length)
             throws ZipException {
             parseFromLocalFileData(buffer, offset, length);
         }
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/Maven221MultiVolumeTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/Maven221MultiVolumeTest.java
index 0a905e3..e8d8a62 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/Maven221MultiVolumeTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/Maven221MultiVolumeTest.java
@@ -122,7 +122,7 @@ public class Maven221MultiVolumeTest {
     @Test(expected=IOException.class)
     public void testRead7ZipMultiVolumeArchiveForFile() throws IOException {
         final File file = getFile("apache-maven-2.2.1.zip.001");
-        ZipFile zf = new ZipFile(file);
+        final ZipFile zf = new ZipFile(file);
         zf.close();
     }
 }
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/NioZipEncodingTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/NioZipEncodingTest.java
index a04730c..4a33917 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/NioZipEncodingTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/NioZipEncodingTest.java
@@ -32,37 +32,37 @@ public class NioZipEncodingTest {
 
     @Test
     public void umlautToUTF16BE() {
-        NioZipEncoding e = new NioZipEncoding(StandardCharsets.UTF_16BE, false);
-        ByteBuffer bb = e.encode(UMLAUTS);
+        final NioZipEncoding e = new NioZipEncoding(StandardCharsets.UTF_16BE, false);
+        final ByteBuffer bb = e.encode(UMLAUTS);
         final int off = bb.arrayOffset();
-        byte[] result = Arrays.copyOfRange(bb.array(), off, off + bb.limit() - bb.position());
+        final byte[] result = Arrays.copyOfRange(bb.array(), off, off + bb.limit() - bb.position());
         Assert.assertArrayEquals(UMLAUTS.getBytes(StandardCharsets.UTF_16BE), result);
     }
 
     @Test
     public void umlautToUTF8() {
-        NioZipEncoding e = new NioZipEncoding(StandardCharsets.UTF_8, true);
-        ByteBuffer bb = e.encode("\u00e4\u00f6\u00fc");
+        final NioZipEncoding e = new NioZipEncoding(StandardCharsets.UTF_8, true);
+        final ByteBuffer bb = e.encode("\u00e4\u00f6\u00fc");
         final int off = bb.arrayOffset();
-        byte[] result = Arrays.copyOfRange(bb.array(), off, off + bb.limit() - bb.position());
+        final byte[] result = Arrays.copyOfRange(bb.array(), off, off + bb.limit() - bb.position());
         Assert.assertArrayEquals(UMLAUTS.getBytes(StandardCharsets.UTF_8), result);
     }
 
     @Test
     public void umlautToISO88591() {
-        NioZipEncoding e = new NioZipEncoding(StandardCharsets.ISO_8859_1, true);
-        ByteBuffer bb = e.encode("\u00e4\u00f6\u00fc");
+        final NioZipEncoding e = new NioZipEncoding(StandardCharsets.ISO_8859_1, true);
+        final ByteBuffer bb = e.encode("\u00e4\u00f6\u00fc");
         final int off = bb.arrayOffset();
-        byte[] result = Arrays.copyOfRange(bb.array(), off, off + bb.limit() - bb.position());
+        final byte[] result = Arrays.copyOfRange(bb.array(), off, off + bb.limit() - bb.position());
         Assert.assertArrayEquals(UMLAUTS.getBytes(StandardCharsets.ISO_8859_1), result);
     }
 
     @Test
     public void unmappableUmlauts() {
-        NioZipEncoding e = new NioZipEncoding(StandardCharsets.US_ASCII, false);
-        ByteBuffer bb = e.encode("\u00e4\u00f6\u00fc");
+        final NioZipEncoding e = new NioZipEncoding(StandardCharsets.US_ASCII, false);
+        final ByteBuffer bb = e.encode("\u00e4\u00f6\u00fc");
         final int off = bb.arrayOffset();
-        byte[] result = Arrays.copyOfRange(bb.array(), off, off + bb.limit() - bb.position());
+        final byte[] result = Arrays.copyOfRange(bb.array(), off, off + bb.limit() - bb.position());
         Assert.assertEquals("%U00E4%U00F6%U00FC", new String(result, StandardCharsets.US_ASCII));
     }
 
@@ -70,28 +70,28 @@ public class NioZipEncodingTest {
 
     @Test
     public void unmappableRainbowEmoji() {
-        NioZipEncoding e = new NioZipEncoding(StandardCharsets.US_ASCII, false);
-        ByteBuffer bb = e.encode(RAINBOW_EMOJI);
+        final NioZipEncoding e = new NioZipEncoding(StandardCharsets.US_ASCII, false);
+        final ByteBuffer bb = e.encode(RAINBOW_EMOJI);
         final int off = bb.arrayOffset();
-        byte[] result = Arrays.copyOfRange(bb.array(), off, off + bb.limit() - bb.position());
+        final byte[] result = Arrays.copyOfRange(bb.array(), off, off + bb.limit() - bb.position());
         Assert.assertEquals("%UD83C%UDF08", new String(result, StandardCharsets.US_ASCII));
     }
 
     @Test
     public void rainbowEmojiToSurrogatePairUTF16() {
-        NioZipEncoding e = new NioZipEncoding(StandardCharsets.UTF_16BE, false);
-        ByteBuffer bb = e.encode(RAINBOW_EMOJI);
+        final NioZipEncoding e = new NioZipEncoding(StandardCharsets.UTF_16BE, false);
+        final ByteBuffer bb = e.encode(RAINBOW_EMOJI);
         final int off = bb.arrayOffset();
-        byte[] result = Arrays.copyOfRange(bb.array(), off, off + bb.limit() - bb.position());
+        final byte[] result = Arrays.copyOfRange(bb.array(), off, off + bb.limit() - bb.position());
         Assert.assertArrayEquals(RAINBOW_EMOJI.getBytes(StandardCharsets.UTF_16BE), result);
     }
 
     @Test
     public void partialSurrogatePair() {
-        NioZipEncoding e = new NioZipEncoding(StandardCharsets.US_ASCII, false);
-        ByteBuffer bb = e.encode("\ud83c");
+        final NioZipEncoding e = new NioZipEncoding(StandardCharsets.US_ASCII, false);
+        final ByteBuffer bb = e.encode("\ud83c");
         final int off = bb.arrayOffset();
-        byte[] result = Arrays.copyOfRange(bb.array(), off, off + bb.limit() - bb.position());
+        final byte[] result = Arrays.copyOfRange(bb.array(), off, off + bb.limit() - bb.position());
         Assert.assertEquals(0, result.length);
     }
 }
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java
index 3b1111a..cbebe88 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java
@@ -86,7 +86,7 @@ public class ParallelScatterZipCreatorTest {
             public CallableConsumer apply(final ParallelScatterZipCreator zipCreator) {
                 return new CallableConsumer() {
                     @Override
-                    public void accept(Callable<? extends ScatterZipOutputStream> c) {
+                    public void accept(final Callable<? extends ScatterZipOutputStream> c) {
                         zipCreator.submit(c);
                     }
                 };
@@ -102,7 +102,7 @@ public class ParallelScatterZipCreatorTest {
             public CallableConsumer apply(final ParallelScatterZipCreator zipCreator) {
                 return new CallableConsumer() {
                     @Override
-                    public void accept(Callable<? extends ScatterZipOutputStream> c) {
+                    public void accept(final Callable<? extends ScatterZipOutputStream> c) {
                         zipCreator.submitStreamAwareCallable(c);
                     }
                 };
@@ -146,7 +146,7 @@ public class ParallelScatterZipCreatorTest {
             public CallableConsumer apply(final ParallelScatterZipCreator zipCreator) {
                 return new CallableConsumer() {
                     @Override
-                    public void accept(Callable<? extends ScatterZipOutputStream> c) {
+                    public void accept(final Callable<? extends ScatterZipOutputStream> c) {
                         zipCreator.submit(c);
                     }
                 };
@@ -162,7 +162,7 @@ public class ParallelScatterZipCreatorTest {
             public CallableConsumer apply(final ParallelScatterZipCreator zipCreator) {
                 return new CallableConsumer() {
                     @Override
-                    public void accept(Callable<? extends ScatterZipOutputStream> c) {
+                    public void accept(final Callable<? extends ScatterZipOutputStream> c) {
                         zipCreator.submitStreamAwareCallable(c);
                     }
                 };
@@ -170,11 +170,11 @@ public class ParallelScatterZipCreatorTest {
         }, Deflater.BEST_COMPRESSION);
     }
 
-    private void callableApi(CallableConsumerSupplier consumerSupplier) throws Exception {
+    private void callableApi(final CallableConsumerSupplier consumerSupplier) throws Exception {
         callableApi(consumerSupplier, Deflater.DEFAULT_COMPRESSION);
     }
 
-    private void callableApi(CallableConsumerSupplier consumerSupplier, int compressionLevel) throws Exception {
+    private void callableApi(final CallableConsumerSupplier consumerSupplier, final int compressionLevel) throws Exception {
         final ZipArchiveOutputStream zos = new ZipArchiveOutputStream(result);
         zos.setEncoding("UTF-8");
         final ExecutorService es = Executors.newFixedThreadPool(1);
@@ -197,7 +197,7 @@ public class ParallelScatterZipCreatorTest {
         assertNotNull(zipCreator.getStatisticsMessage());
     }
 
-    private void callableApiWithTestFiles(CallableConsumerSupplier consumerSupplier, int compressionLevel) throws Exception {
+    private void callableApiWithTestFiles(final CallableConsumerSupplier consumerSupplier, final int compressionLevel) throws Exception {
         final ZipArchiveOutputStream zos = new ZipArchiveOutputStream(result);
         zos.setEncoding("UTF-8");
         final ExecutorService es = Executors.newFixedThreadPool(1);
@@ -313,7 +313,7 @@ public class ParallelScatterZipCreatorTest {
     private Map<String, byte[]> writeTestFilesAsCallable(final ParallelScatterZipCreator zipCreator,
                                                          final CallableConsumer consumer) throws IOException {
         final Map<String, byte[]> entries = new HashMap<>();
-        File baseDir = getFile("");
+        final File baseDir = getFile("");
         int filesCount = 0;
         for (final File file : baseDir.listFiles()) {
             // do not compress too many files
@@ -338,7 +338,7 @@ public class ParallelScatterZipCreatorTest {
                 public InputStream get() {
                     try {
                         return new FileInputStream(file);
-                    } catch (FileNotFoundException e) {
+                    } catch (final FileNotFoundException e) {
                         return null;
                     }
                 }
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/PkWareExtraHeaderTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/PkWareExtraHeaderTest.java
index 3fe1730..c3071ec 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/PkWareExtraHeaderTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/PkWareExtraHeaderTest.java
@@ -28,17 +28,17 @@ import org.junit.Test;
 public class PkWareExtraHeaderTest {
 
     @Test public void testEncryptionAlgorithm() {
-        String name = "AES256";
-        int code = EncryptionAlgorithm.AES256.getCode();
-        EncryptionAlgorithm e = EncryptionAlgorithm.valueOf(name);
+        final String name = "AES256";
+        final int code = EncryptionAlgorithm.AES256.getCode();
+        final EncryptionAlgorithm e = EncryptionAlgorithm.valueOf(name);
         assertEquals(code,e.getCode());
         assertNotNull(e);
     }
 
     @Test public void testHashAlgorithm() {
-        String name = "SHA256";
-        int code = HashAlgorithm.SHA256.getCode();
-        HashAlgorithm e = HashAlgorithm.valueOf(name);
+        final String name = "SHA256";
+        final int code = HashAlgorithm.SHA256.getCode();
+        final HashAlgorithm e = HashAlgorithm.valueOf(name);
         assertEquals(code,e.getCode());
         assertNotNull(e);
     }
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/StreamCompressorTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/StreamCompressorTest.java
index 38ed531..aaf0e23 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/StreamCompressorTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/StreamCompressorTest.java
@@ -62,7 +62,7 @@ public class StreamCompressorTest {
 
     @Test
     public void testCreateDataOutputCompressor() throws IOException {
-        DataOutput dataOutputStream = new DataOutputStream(new ByteArrayOutputStream());
+        final DataOutput dataOutputStream = new DataOutputStream(new ByteArrayOutputStream());
         try (StreamCompressor streamCompressor = StreamCompressor
             .create(dataOutputStream, new Deflater(9))) {
             assertNotNull(streamCompressor);
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestampTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestampTest.java
index bcd0592..c89ec0a 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestampTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestampTest.java
@@ -249,7 +249,7 @@ public class X5455_ExtendedTimestampTest {
         // get/set modify time
         xf.setModifyTime(time);
         assertEquals(time, xf.getModifyTime());
-        Date xfModifyJavaTime = xf.getModifyJavaTime();
+        final Date xfModifyJavaTime = xf.getModifyJavaTime();
         assertEquals(timeMillis, xfModifyJavaTime.getTime());
         xf.setModifyJavaTime(new Date(timeMillis));
         assertEquals(time, xf.getModifyTime());
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/Zip64SupportIT.java b/src/test/java/org/apache/commons/compress/archivers/zip/Zip64SupportIT.java
index 0088448..ee3d5a4 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/Zip64SupportIT.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/Zip64SupportIT.java
@@ -1966,7 +1966,7 @@ public class Zip64SupportIT {
                     }, extra);
                     // skip compressed size
                     a.skipBytes(8);
-                    byte[] offset = new byte[8];
+                    final byte[] offset = new byte[8];
                     a.readFully(offset);
                     assertArrayEquals("extra offset", new byte[] {
                             0, 0, 0, 0, 0, 0, 0, 0,
@@ -2325,7 +2325,7 @@ public class Zip64SupportIT {
                     }, extra);
                     // skip compressed size
                     a.skipBytes(8);
-                    byte[] offset = new byte[8];
+                    final byte[] offset = new byte[8];
                     a.readFully(offset);
                     assertArrayEquals("extra offset", new byte[] {
                             0, 0, 0, 0, 0, 0, 0, 0,
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
index 538a535..9e58ebd 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
@@ -282,14 +282,14 @@ public class ZipArchiveEntryTest {
     @Test
     public void isUnixSymlinkIsFalseIfMoreThanOneFlagIsSet() throws Exception {
         try (ZipFile zf = new ZipFile(getFile("COMPRESS-379.jar"))) {
-            ZipArchiveEntry ze = zf.getEntry("META-INF/maven/");
+            final ZipArchiveEntry ze = zf.getEntry("META-INF/maven/");
             assertFalse(ze.isUnixSymlink());
         }
     }
 
     @Test
     public void testIsUnixSymlink() {
-        ZipArchiveEntry ze = new ZipArchiveEntry("foo");
+        final ZipArchiveEntry ze = new ZipArchiveEntry("foo");
         ze.setUnixMode(UnixStat.LINK_FLAG);
         assertTrue(ze.isUnixSymlink());
         ze.setUnixMode(UnixStat.LINK_FLAG | UnixStat.DIR_FLAG);
@@ -300,7 +300,7 @@ public class ZipArchiveEntryTest {
     public void reparsingUnicodeExtraWithUnsupportedversionThrowsInStrictMode()
         throws Exception {
         try (ZipFile zf = new ZipFile(getFile("COMPRESS-479.zip"))) {
-            ZipArchiveEntry ze = zf.getEntry("%U20AC_for_Dollar.txt");
+            final ZipArchiveEntry ze = zf.getEntry("%U20AC_for_Dollar.txt");
             thrown.expect(ZipException.class);
             thrown.expectMessage("Unsupported version [116] for UniCode path extra data.");
             ze.getExtraFields(ZipArchiveEntry.ExtraFieldParsingMode.STRICT_FOR_KNOW_EXTRA_FIELDS);
@@ -309,44 +309,44 @@ public class ZipArchiveEntryTest {
 
     @Test
     public void bestEffortIncludesUnparseableExtraData() throws Exception {
-        ZipExtraField[] extraFields = parsingModeBehaviorTestData();
-        ZipArchiveEntry ze = new ZipArchiveEntry("foo");
+        final ZipExtraField[] extraFields = parsingModeBehaviorTestData();
+        final ZipArchiveEntry ze = new ZipArchiveEntry("foo");
         ze.setExtraFields(extraFields);
-        ZipExtraField[] read = ze.getExtraFields(ZipArchiveEntry.ExtraFieldParsingMode.BEST_EFFORT);
+        final ZipExtraField[] read = ze.getExtraFields(ZipArchiveEntry.ExtraFieldParsingMode.BEST_EFFORT);
         assertEquals(extraFields.length, read.length);
     }
 
     @Test
     public void onlyParseableLenientExcludesUnparseableExtraData() throws Exception {
-        ZipExtraField[] extraFields = parsingModeBehaviorTestData();
-        ZipArchiveEntry ze = new ZipArchiveEntry("foo");
+        final ZipExtraField[] extraFields = parsingModeBehaviorTestData();
+        final ZipArchiveEntry ze = new ZipArchiveEntry("foo");
         ze.setExtraFields(extraFields);
-        ZipExtraField[] read = ze.getExtraFields(ZipArchiveEntry.ExtraFieldParsingMode.ONLY_PARSEABLE_LENIENT);
+        final ZipExtraField[] read = ze.getExtraFields(ZipArchiveEntry.ExtraFieldParsingMode.ONLY_PARSEABLE_LENIENT);
         assertEquals(extraFields.length, read.length + 1);
     }
 
     @Test
     public void strictForKnowExtraFieldsIncludesUnparseableExtraData() throws Exception {
-        ZipExtraField[] extraFields = parsingModeBehaviorTestData();
-        ZipArchiveEntry ze = new ZipArchiveEntry("foo");
+        final ZipExtraField[] extraFields = parsingModeBehaviorTestData();
+        final ZipArchiveEntry ze = new ZipArchiveEntry("foo");
         ze.setExtraFields(extraFields);
-        ZipExtraField[] read = ze.getExtraFields(ZipArchiveEntry.ExtraFieldParsingMode.STRICT_FOR_KNOW_EXTRA_FIELDS);
+        final ZipExtraField[] read = ze.getExtraFields(ZipArchiveEntry.ExtraFieldParsingMode.STRICT_FOR_KNOW_EXTRA_FIELDS);
         assertEquals(extraFields.length, read.length);
     }
 
     @Test
     public void onlyParseableStrictExcludesUnparseableExtraData() throws Exception {
-        ZipExtraField[] extraFields = parsingModeBehaviorTestData();
-        ZipArchiveEntry ze = new ZipArchiveEntry("foo");
+        final ZipExtraField[] extraFields = parsingModeBehaviorTestData();
+        final ZipArchiveEntry ze = new ZipArchiveEntry("foo");
         ze.setExtraFields(extraFields);
-        ZipExtraField[] read = ze.getExtraFields(ZipArchiveEntry.ExtraFieldParsingMode.ONLY_PARSEABLE_STRICT);
+        final ZipExtraField[] read = ze.getExtraFields(ZipArchiveEntry.ExtraFieldParsingMode.ONLY_PARSEABLE_STRICT);
         assertEquals(extraFields.length, read.length + 1);
     }
 
     @Test
     public void draconicThrowsOnUnparseableExtraData() throws Exception {
-        ZipExtraField[] extraFields = parsingModeBehaviorTestData();
-        ZipArchiveEntry ze = new ZipArchiveEntry("foo");
+        final ZipExtraField[] extraFields = parsingModeBehaviorTestData();
+        final ZipArchiveEntry ze = new ZipArchiveEntry("foo");
         ze.setExtraFields(extraFields);
         thrown.expect(ZipException.class);
         thrown.expectMessage("Bad extra field starting at");
@@ -361,7 +361,7 @@ public class ZipArchiveEntryTest {
         u.setHeaderId(ExtraFieldUtilsTest.UNRECOGNIZED_HEADER);
         u.setLocalFileDataData(new byte[0]);
         final UnparseableExtraFieldData x = new UnparseableExtraFieldData();
-        byte[] unparseable = new byte[] {
+        final byte[] unparseable = new byte[] {
             0, 0, (byte) 0xff, (byte) 0xff, 0, 0, 0
         };
         x.parseFromLocalFileData(unparseable, 0, unparseable.length);
@@ -371,8 +371,8 @@ public class ZipArchiveEntryTest {
     @Test
     public void testZipArchiveClone() throws Exception {
         try (ZipFile zf = new ZipFile(getFile("COMPRESS-479.zip"))) {
-            ZipArchiveEntry ze = zf.getEntry("%U20AC_for_Dollar.txt");
-            ZipArchiveEntry clonedZe = (ZipArchiveEntry) ze.clone();
+            final ZipArchiveEntry ze = zf.getEntry("%U20AC_for_Dollar.txt");
+            final ZipArchiveEntry clonedZe = (ZipArchiveEntry) ze.clone();
             assertTrue(ze.equals(clonedZe));
         }
     }
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java
index 4f10afb..9e47fcd 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java
@@ -227,9 +227,9 @@ public class ZipArchiveInputStreamTest {
         final File archive = getFile("COMPRESS-380/COMPRESS-380.zip");
         try (FileInputStream in = new FileInputStream(input);
              ZipArchiveInputStream zin = new ZipArchiveInputStream(new FileInputStream(archive))) {
-            byte[] orig = IOUtils.toByteArray(in);
-            ZipArchiveEntry e = zin.getNextZipEntry();
-            byte[] fromZip = IOUtils.toByteArray(zin);
+            final byte[] orig = IOUtils.toByteArray(in);
+            final ZipArchiveEntry e = zin.getNextZipEntry();
+            final byte[] fromZip = IOUtils.toByteArray(zin);
             assertArrayEquals(orig, fromZip);
         }
     }
@@ -239,11 +239,11 @@ public class ZipArchiveInputStreamTest {
         // this is a copy of bla.jar with META-INF/MANIFEST.MF's method manually changed to ENHANCED_DEFLATED
         final File archive = getFile("COMPRESS-380/COMPRESS-380-dd.zip");
         try (ZipArchiveInputStream zin = new ZipArchiveInputStream(new FileInputStream(archive))) {
-            ZipArchiveEntry e = zin.getNextZipEntry();
+            final ZipArchiveEntry e = zin.getNextZipEntry();
             assertEquals(-1, e.getSize());
             assertEquals(ZipMethod.ENHANCED_DEFLATED.getCode(), e.getMethod());
-            byte[] fromZip = IOUtils.toByteArray(zin);
-            byte[] expected = new byte[] {
+            final byte[] fromZip = IOUtils.toByteArray(zin);
+            final byte[] expected = new byte[] {
                 'M', 'a', 'n', 'i', 'f', 'e', 's', 't', '-', 'V', 'e', 'r', 's', 'i', 'o', 'n', ':', ' ', '1', '.', '0',
                 '\r', '\n', '\r', '\n'
             };
@@ -292,7 +292,7 @@ public class ZipArchiveInputStreamTest {
         try {
             zip.getNextZipEntry();
             fail("IOException expected");
-        } catch (ZipException expected) {
+        } catch (final ZipException expected) {
             assertTrue(expected.getMessage().contains("Unexpected record signature"));
         } finally {
             zip.close();
@@ -308,11 +308,11 @@ public class ZipArchiveInputStreamTest {
         try (InputStream archiveStream = ZipArchiveInputStream.class.getResourceAsStream("/mixed.zip");
              ZipArchiveInputStream zipStream =  new ZipArchiveInputStream((archiveStream))
         ) {
-            ZipArchiveEntry inflatedEntry = zipStream.getNextZipEntry();
+            final ZipArchiveEntry inflatedEntry = zipStream.getNextZipEntry();
             Assert.assertEquals("inflated.txt", inflatedEntry.getName());
             Assert.assertEquals(0x0000, inflatedEntry.getLocalHeaderOffset());
             Assert.assertEquals(0x0046, inflatedEntry.getDataOffset());
-            ZipArchiveEntry storedEntry = zipStream.getNextZipEntry();
+            final ZipArchiveEntry storedEntry = zipStream.getNextZipEntry();
             Assert.assertEquals("stored.txt", storedEntry.getName());
             Assert.assertEquals(0x5892, storedEntry.getLocalHeaderOffset());
             Assert.assertEquals(0x58d6, storedEntry.getDataOffset());
@@ -341,7 +341,7 @@ public class ZipArchiveInputStreamTest {
     public void properlyMarksEntriesAsUnreadableIfUncompressedSizeIsUnknown() throws Exception {
         // we never read any data
         try (ZipArchiveInputStream zis = new ZipArchiveInputStream(new ByteArrayInputStream(new byte[0]))) {
-            ZipArchiveEntry e = new ZipArchiveEntry("test");
+            final ZipArchiveEntry e = new ZipArchiveEntry("test");
             e.setMethod(ZipMethod.DEFLATED.getCode());
             assertTrue(zis.canReadEntryData(e));
             e.setMethod(ZipMethod.ENHANCED_DEFLATED.getCode());
@@ -381,10 +381,10 @@ public class ZipArchiveInputStreamTest {
         singleByteReadConsistentlyReturnsMinusOneAtEof(getFile("bzip2-zip.zip"));
     }
 
-    private void singleByteReadConsistentlyReturnsMinusOneAtEof(File file) throws Exception {
+    private void singleByteReadConsistentlyReturnsMinusOneAtEof(final File file) throws Exception {
         try (FileInputStream in = new FileInputStream(file);
              ZipArchiveInputStream archive = new ZipArchiveInputStream(in)) {
-            ArchiveEntry e = archive.getNextEntry();
+            final ArchiveEntry e = archive.getNextEntry();
             IOUtils.toByteArray(archive);
             assertEquals(-1, archive.read());
             assertEquals(-1, archive.read());
@@ -421,11 +421,11 @@ public class ZipArchiveInputStreamTest {
         multiByteReadConsistentlyReturnsMinusOneAtEof(getFile("bzip2-zip.zip"));
     }
 
-    private void multiByteReadConsistentlyReturnsMinusOneAtEof(File file) throws Exception {
-        byte[] buf = new byte[2];
+    private void multiByteReadConsistentlyReturnsMinusOneAtEof(final File file) throws Exception {
+        final byte[] buf = new byte[2];
         try (FileInputStream in = new FileInputStream(getFile("bla.zip"));
              ZipArchiveInputStream archive = new ZipArchiveInputStream(in)) {
-            ArchiveEntry e = archive.getNextEntry();
+            final ArchiveEntry e = archive.getNextEntry();
             IOUtils.toByteArray(archive);
             assertEquals(-1, archive.read(buf));
             assertEquals(-1, archive.read(buf));
@@ -444,23 +444,23 @@ public class ZipArchiveInputStreamTest {
         }
         try (ByteArrayInputStream in = new ByteArrayInputStream(content);
              ZipArchiveInputStream archive = new ZipArchiveInputStream(in)) {
-            ArchiveEntry e = archive.getNextEntry();
+            final ArchiveEntry e = archive.getNextEntry();
             try {
                 IOUtils.toByteArray(archive);
                 fail("expected exception");
-            } catch (IOException ex) {
+            } catch (final IOException ex) {
                 assertEquals("Truncated ZIP file", ex.getMessage());
             }
             try {
                 archive.read();
                 fail("expected exception");
-            } catch (IOException ex) {
+            } catch (final IOException ex) {
                 assertEquals("Truncated ZIP file", ex.getMessage());
             }
             try {
                 archive.read();
                 fail("expected exception");
-            } catch (IOException ex) {
+            } catch (final IOException ex) {
                 assertEquals("Truncated ZIP file", ex.getMessage());
             }
         }
@@ -476,26 +476,26 @@ public class ZipArchiveInputStreamTest {
         for (int i = 17; i < 26; i++) {
             content[i] = (byte) 0xff;
         }
-        byte[] buf = new byte[2];
+        final byte[] buf = new byte[2];
         try (ByteArrayInputStream in = new ByteArrayInputStream(content);
              ZipArchiveInputStream archive = new ZipArchiveInputStream(in)) {
-            ArchiveEntry e = archive.getNextEntry();
+            final ArchiveEntry e = archive.getNextEntry();
             try {
                 IOUtils.toByteArray(archive);
                 fail("expected exception");
-            } catch (IOException ex) {
+            } catch (final IOException ex) {
                 assertEquals("Truncated ZIP file", ex.getMessage());
             }
             try {
                 archive.read(buf);
                 fail("expected exception");
-            } catch (IOException ex) {
+            } catch (final IOException ex) {
                 assertEquals("Truncated ZIP file", ex.getMessage());
             }
             try {
                 archive.read(buf);
                 fail("expected exception");
-            } catch (IOException ex) {
+            } catch (final IOException ex) {
                 assertEquals("Truncated ZIP file", ex.getMessage());
             }
         }
@@ -527,14 +527,14 @@ public class ZipArchiveInputStreamTest {
     public void rejectsStoredEntriesWithDataDescriptorByDefault() throws IOException {
         try (FileInputStream fs = new FileInputStream(getFile("bla-stored-dd.zip"));
              ZipArchiveInputStream archive = new ZipArchiveInputStream(fs)) {
-            ZipArchiveEntry e = archive.getNextZipEntry();
+            final ZipArchiveEntry e = archive.getNextZipEntry();
             assertNotNull(e);
             assertEquals("test1.xml", e.getName());
             assertEquals(-1, e.getCompressedSize());
             assertEquals(-1, e.getSize());
             thrown.expect(UnsupportedZipFeatureException.class);
             thrown.expectMessage("Unsupported feature data descriptor used in entry test1.xml");
-            byte[] data = IOUtils.toByteArray(archive);
+            final byte[] data = IOUtils.toByteArray(archive);
         }
     }
 
@@ -542,12 +542,12 @@ public class ZipArchiveInputStreamTest {
     public void properlyReadsStoredEntryWithDataDescriptorWithSignature() throws IOException {
         try (FileInputStream fs = new FileInputStream(getFile("bla-stored-dd.zip"));
              ZipArchiveInputStream archive = new ZipArchiveInputStream(fs, "UTF-8", true, true)) {
-            ZipArchiveEntry e = archive.getNextZipEntry();
+            final ZipArchiveEntry e = archive.getNextZipEntry();
             assertNotNull(e);
             assertEquals("test1.xml", e.getName());
             assertEquals(-1, e.getCompressedSize());
             assertEquals(-1, e.getSize());
-            byte[] data = IOUtils.toByteArray(archive);
+            final byte[] data = IOUtils.toByteArray(archive);
             assertEquals(610, data.length);
             assertEquals(610, e.getCompressedSize());
             assertEquals(610, e.getSize());
@@ -558,12 +558,12 @@ public class ZipArchiveInputStreamTest {
     public void properlyReadsStoredEntryWithDataDescriptorWithoutSignature() throws IOException {
         try (FileInputStream fs = new FileInputStream(getFile("bla-stored-dd-nosig.zip"));
              ZipArchiveInputStream archive = new ZipArchiveInputStream(fs, "UTF-8", true, true)) {
-            ZipArchiveEntry e = archive.getNextZipEntry();
+            final ZipArchiveEntry e = archive.getNextZipEntry();
             assertNotNull(e);
             assertEquals("test1.xml", e.getName());
             assertEquals(-1, e.getCompressedSize());
             assertEquals(-1, e.getSize());
-            byte[] data = IOUtils.toByteArray(archive);
+            final byte[] data = IOUtils.toByteArray(archive);
             assertEquals(610, data.length);
             assertEquals(610, e.getCompressedSize());
             assertEquals(610, e.getSize());
@@ -574,14 +574,14 @@ public class ZipArchiveInputStreamTest {
     public void throwsIfStoredDDIsInconsistent() throws IOException {
         try (FileInputStream fs = new FileInputStream(getFile("bla-stored-dd-sizes-differ.zip"));
              ZipArchiveInputStream archive = new ZipArchiveInputStream(fs, "UTF-8", true, true)) {
-            ZipArchiveEntry e = archive.getNextZipEntry();
+            final ZipArchiveEntry e = archive.getNextZipEntry();
             assertNotNull(e);
             assertEquals("test1.xml", e.getName());
             assertEquals(-1, e.getCompressedSize());
             assertEquals(-1, e.getSize());
             thrown.expect(ZipException.class);
             thrown.expectMessage("compressed and uncompressed size don't match");
-            byte[] data = IOUtils.toByteArray(archive);
+            final byte[] data = IOUtils.toByteArray(archive);
         }
     }
 
@@ -589,25 +589,25 @@ public class ZipArchiveInputStreamTest {
     public void throwsIfStoredDDIsDifferentFromLengthRead() throws IOException {
         try (FileInputStream fs = new FileInputStream(getFile("bla-stored-dd-contradicts-actualsize.zip"));
              ZipArchiveInputStream archive = new ZipArchiveInputStream(fs, "UTF-8", true, true)) {
-            ZipArchiveEntry e = archive.getNextZipEntry();
+            final ZipArchiveEntry e = archive.getNextZipEntry();
             assertNotNull(e);
             assertEquals("test1.xml", e.getName());
             assertEquals(-1, e.getCompressedSize());
             assertEquals(-1, e.getSize());
             thrown.expect(ZipException.class);
             thrown.expectMessage("actual and claimed size don't match");
-            byte[] data = IOUtils.toByteArray(archive);
+            final byte[] data = IOUtils.toByteArray(archive);
         }
     }
 
     @Test
     public void testSplitZipCreatedByZip() throws IOException {
-        File lastFile = getFile("COMPRESS-477/split_zip_created_by_zip/split_zip_created_by_zip.zip");
+        final File lastFile = getFile("COMPRESS-477/split_zip_created_by_zip/split_zip_created_by_zip.zip");
         try (SeekableByteChannel channel = ZipSplitReadOnlySeekableByteChannel.buildFromLastSplitSegment(lastFile);
              InputStream inputStream = Channels.newInputStream(channel);
              ZipArchiveInputStream splitInputStream = new ZipArchiveInputStream(inputStream, ZipEncodingHelper.UTF8, true, false, true)) {
 
-            File fileToCompare = getFile("COMPRESS-477/split_zip_created_by_zip/zip_to_compare_created_by_zip.zip");
+            final File fileToCompare = getFile("COMPRESS-477/split_zip_created_by_zip/zip_to_compare_created_by_zip.zip");
             try (ZipArchiveInputStream inputStreamToCompare = new ZipArchiveInputStream(new FileInputStream(fileToCompare), ZipEncodingHelper.UTF8, true, false, true)) {
 
                 ArchiveEntry entry;
@@ -624,12 +624,12 @@ public class ZipArchiveInputStreamTest {
 
     @Test
     public void testSplitZipCreatedByZipOfZip64() throws IOException {
-        File lastFile = getFile("COMPRESS-477/split_zip_created_by_zip/split_zip_created_by_zip_zip64.zip");
+        final File lastFile = getFile("COMPRESS-477/split_zip_created_by_zip/split_zip_created_by_zip_zip64.zip");
         try (SeekableByteChannel channel = ZipSplitReadOnlySeekableByteChannel.buildFromLastSplitSegment(lastFile);
              InputStream inputStream = Channels.newInputStream(channel);
              ZipArchiveInputStream splitInputStream = new ZipArchiveInputStream(inputStream, ZipEncodingHelper.UTF8, true, false, true)) {
 
-            File fileToCompare = getFile("COMPRESS-477/split_zip_created_by_zip/zip_to_compare_created_by_zip_zip64.zip");
+            final File fileToCompare = getFile("COMPRESS-477/split_zip_created_by_zip/zip_to_compare_created_by_zip_zip64.zip");
             try (ZipArchiveInputStream inputStreamToCompare = new ZipArchiveInputStream(new FileInputStream(fileToCompare), ZipEncodingHelper.UTF8, true, false, true)) {
 
                 ArchiveEntry entry;
@@ -646,12 +646,12 @@ public class ZipArchiveInputStreamTest {
 
     @Test
     public void testSplitZipCreatedByWinrar() throws IOException {
-        File lastFile = getFile("COMPRESS-477/split_zip_created_by_winrar/split_zip_created_by_winrar.zip");
+        final File lastFile = getFile("COMPRESS-477/split_zip_created_by_winrar/split_zip_created_by_winrar.zip");
         try (SeekableByteChannel channel = ZipSplitReadOnlySeekableByteChannel.buildFromLastSplitSegment(lastFile);
              InputStream inputStream = Channels.newInputStream(channel);
              ZipArchiveInputStream splitInputStream = new ZipArchiveInputStream(inputStream, ZipEncodingHelper.UTF8, true, false, true)) {
 
-            File fileToCompare = getFile("COMPRESS-477/split_zip_created_by_winrar/zip_to_compare_created_by_winrar.zip");
+            final File fileToCompare = getFile("COMPRESS-477/split_zip_created_by_winrar/zip_to_compare_created_by_winrar.zip");
             try (ZipArchiveInputStream inputStreamToCompare = new ZipArchiveInputStream(new FileInputStream(fileToCompare), ZipEncodingHelper.UTF8, true, false, true)) {
 
                 ArchiveEntry entry;
@@ -669,9 +669,9 @@ public class ZipArchiveInputStreamTest {
     @Test
     public void testSplitZipCreatedByZipThrowsException() throws IOException {
         thrown.expect(EOFException.class);
-        File zipSplitFile = getFile("COMPRESS-477/split_zip_created_by_zip/split_zip_created_by_zip.z01");
-        InputStream fileInputStream = new FileInputStream(zipSplitFile);
-        ZipArchiveInputStream inputStream = new ZipArchiveInputStream(fileInputStream, ZipEncodingHelper.UTF8, true, false, true);
+        final File zipSplitFile = getFile("COMPRESS-477/split_zip_created_by_zip/split_zip_created_by_zip.z01");
+        final InputStream fileInputStream = new FileInputStream(zipSplitFile);
+        final ZipArchiveInputStream inputStream = new ZipArchiveInputStream(fileInputStream, ZipEncodingHelper.UTF8, true, false, true);
 
         ArchiveEntry entry = inputStream.getNextEntry();
         while(entry != null){
@@ -710,7 +710,7 @@ public class ZipArchiveInputStreamTest {
         });
     }
 
-    private static byte[] readEntry(ZipArchiveInputStream zip, ZipArchiveEntry zae) throws IOException {
+    private static byte[] readEntry(final ZipArchiveInputStream zip, final ZipArchiveEntry zae) throws IOException {
         final int len = (int)zae.getSize();
         final byte[] buff = new byte[len];
         zip.read(buff, 0, len);
@@ -718,11 +718,11 @@ public class ZipArchiveInputStreamTest {
         return buff;
     }
 
-    private static void nameSource(String archive, String entry, ZipArchiveEntry.NameSource expected) throws Exception {
+    private static void nameSource(final String archive, final String entry, final ZipArchiveEntry.NameSource expected) throws Exception {
         nameSource(archive, entry, 1, expected);
     }
 
-    private static void nameSource(String archive, String entry, int entryNo, ZipArchiveEntry.NameSource expected)
+    private static void nameSource(final String archive, final String entry, int entryNo, final ZipArchiveEntry.NameSource expected)
         throws Exception {
         try (ZipArchiveInputStream zis = new ZipArchiveInputStream(new FileInputStream(getFile(archive)))) {
             ZipArchiveEntry ze;
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipClassCoverageTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipClassCoverageTest.java
index 0595877..79a6432 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipClassCoverageTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipClassCoverageTest.java
@@ -32,13 +32,13 @@ public class ZipClassCoverageTest {
 
     @Test
     public void testConstructZip64RequiredException() {
-        Zip64RequiredException e = new Zip64RequiredException("critique of pure");
+        final Zip64RequiredException e = new Zip64RequiredException("critique of pure");
         assertNotNull(e);
     }
     @Test
     public void testMessageException() {
-        ZipArchiveEntry ze = new ZipArchiveEntry("hello");
-        String entryTooBigMessage = Zip64RequiredException.getEntryTooBigMessage(ze);
+        final ZipArchiveEntry ze = new ZipArchiveEntry("hello");
+        final String entryTooBigMessage = Zip64RequiredException.getEntryTooBigMessage(ze);
         assertEquals("hello's size exceeds the limit of 4GByte.",
             entryTooBigMessage);
     }
@@ -46,11 +46,11 @@ public class ZipClassCoverageTest {
     @Test
     public void testConstantConstructor()
         throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {
-        Class<ZipConstants> clazz = ZipConstants.class;
-        Constructor<ZipConstants> constructor = clazz.getDeclaredConstructor();
+        final Class<ZipConstants> clazz = ZipConstants.class;
+        final Constructor<ZipConstants> constructor = clazz.getDeclaredConstructor();
         assertFalse(constructor.isAccessible());
         constructor.setAccessible(true);
-        Object o = constructor.newInstance();
+        final Object o = constructor.newInstance();
         assertThat(o, IsInstanceOf.instanceOf(clazz));
         constructor.setAccessible(false);
 
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipEncodingTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipEncodingTest.java
index 9270c52..7ed9544 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipEncodingTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipEncodingTest.java
@@ -47,17 +47,17 @@ public class ZipEncodingTest {
 
     @Test
     public void testNothingToMakeCoverallsHappier() {
-        Object o = new ZipEncodingHelper() {
+        final Object o = new ZipEncodingHelper() {
         };
         assertNotNull(o);
     }
 
     @Test
     public void testGetNonexistentEncoding() throws IOException {
-        ZipEncoding ze = ZipEncodingHelper.getZipEncoding("I-am-a-banana");
+        final ZipEncoding ze = ZipEncodingHelper.getZipEncoding("I-am-a-banana");
         assertNotNull(ze);
         if (ze instanceof CharsetAccessor) {
-            CharsetAccessor hasCharset = (CharsetAccessor) ze;
+            final CharsetAccessor hasCharset = (CharsetAccessor) ze;
             Assert.assertEquals(Charset.defaultCharset(), hasCharset.getCharset());
         }
     }
@@ -86,7 +86,7 @@ public class ZipEncodingTest {
     }
 
 
-    private void doSimpleEncodingsTest(int n) throws IOException {
+    private void doSimpleEncodingsTest(final int n) throws IOException {
 
         doSimpleEncodingTest("Cp" + n, null);
         doSimpleEncodingTest("cp" + n, null);
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileIgnoringLocalFileHeaderTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileIgnoringLocalFileHeaderTest.java
index 3d40c03..549afa3 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileIgnoringLocalFileHeaderTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileIgnoringLocalFileHeaderTest.java
@@ -53,8 +53,8 @@ public class ZipFileIgnoringLocalFileHeaderTest {
     @Test
     public void testZipUnarchive() throws Exception {
         try (final ZipFile zf = openZipWithoutLFH("bla.zip")) {
-            for (Enumeration<ZipArchiveEntry> e = zf.getEntries(); e.hasMoreElements(); ) {
-                ZipArchiveEntry entry = e.nextElement();
+            for (final Enumeration<ZipArchiveEntry> e = zf.getEntries(); e.hasMoreElements(); ) {
+                final ZipArchiveEntry entry = e.nextElement();
                 try (final OutputStream out = new FileOutputStream(new File(dir, entry.getName()))) {
                     IOUtils.copy(zf.getInputStream(entry), out);
                 }
@@ -65,7 +65,7 @@ public class ZipFileIgnoringLocalFileHeaderTest {
     @Test
     public void getEntryWorks() throws IOException {
         try (final ZipFile zf = openZipWithoutLFH("bla.zip")) {
-            ZipArchiveEntry ze = zf.getEntry("test1.xml");
+            final ZipArchiveEntry ze = zf.getEntry("test1.xml");
             Assert.assertEquals(610, ze.getSize());
         }
     }
@@ -85,7 +85,7 @@ public class ZipFileIgnoringLocalFileHeaderTest {
     @Test
     public void getRawInputStreamReturnsNull() throws IOException {
         try (final ZipFile zf = openZipWithoutLFH("bla.zip")) {
-            ZipArchiveEntry ze = zf.getEntry("test1.xml");
+            final ZipArchiveEntry ze = zf.getEntry("test1.xml");
             Assert.assertNull(zf.getRawInputStream(ze));
         }
     }
@@ -93,7 +93,7 @@ public class ZipFileIgnoringLocalFileHeaderTest {
     @Test
     public void testPhysicalOrder() throws IOException {
         try (final ZipFile zf = openZipWithoutLFH("ordertest.zip")) {
-            Enumeration<ZipArchiveEntry> e = zf.getEntriesInPhysicalOrder();
+            final Enumeration<ZipArchiveEntry> e = zf.getEntriesInPhysicalOrder();
             ZipArchiveEntry ze = null;
             do {
                 ze = e.nextElement();
@@ -102,7 +102,7 @@ public class ZipFileIgnoringLocalFileHeaderTest {
         }
     }
 
-    private static ZipFile openZipWithoutLFH(String fileName) throws IOException {
+    private static ZipFile openZipWithoutLFH(final String fileName) throws IOException {
         return new ZipFile(AbstractTestCase.getFile(fileName), ZipEncodingHelper.UTF8, true, true);
     }
 }
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
index 05d86d4..d29c998 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
@@ -155,10 +155,10 @@ public class ZipFileTest {
     @Test
     public void testPhysicalOrderOfSpecificFile() throws Exception {
         readOrderTest();
-        String entryName = "src/main/java/org/apache/commons/compress/archivers/zip/ZipExtraField.java";
-        Iterable<ZipArchiveEntry> entries = zf.getEntriesInPhysicalOrder(entryName);
-        Iterator<ZipArchiveEntry> iter = entries.iterator();
-        ZipArchiveEntry entry = iter.next();
+        final String entryName = "src/main/java/org/apache/commons/compress/archivers/zip/ZipExtraField.java";
+        final Iterable<ZipArchiveEntry> entries = zf.getEntriesInPhysicalOrder(entryName);
+        final Iterator<ZipArchiveEntry> iter = entries.iterator();
+        final ZipArchiveEntry entry = iter.next();
 
         assertEquals(entryName, entry.getName());
         assertFalse(iter.hasNext());
@@ -367,22 +367,22 @@ public class ZipFileTest {
         zf = new ZipFile(new SeekableInMemoryByteChannel(data), ZipEncodingHelper.UTF8);
 
         final Map<String, byte[]> content = new HashMap<String, byte[]>();
-        for (ZipArchiveEntry entry: Collections.list(zf.getEntries())) {
+        for (final ZipArchiveEntry entry: Collections.list(zf.getEntries())) {
             content.put(entry.getName(), IOUtils.toByteArray(zf.getInputStream(entry)));
         }
 
         final AtomicInteger passedCount = new AtomicInteger();
-        Runnable run = new Runnable() {
+        final Runnable run = new Runnable() {
             @Override
             public void run() {
-                for (ZipArchiveEntry entry: Collections.list(zf.getEntries())) {
+                for (final ZipArchiveEntry entry: Collections.list(zf.getEntries())) {
                     assertAllReadMethods(content.get(entry.getName()), zf, entry);
                 }
                 passedCount.incrementAndGet();
             }
         };
-        Thread t0 = new Thread(run);
-        Thread t1 = new Thread(run);
+        final Thread t0 = new Thread(run);
+        final Thread t1 = new Thread(run);
         t0.start();
         t1.start();
         t0.join();
@@ -397,22 +397,22 @@ public class ZipFileTest {
         zf = new ZipFile(archive);
 
         final Map<String, byte[]> content = new HashMap<String, byte[]>();
-        for (ZipArchiveEntry entry: Collections.list(zf.getEntries())) {
+        for (final ZipArchiveEntry entry: Collections.list(zf.getEntries())) {
             content.put(entry.getName(), IOUtils.toByteArray(zf.getInputStream(entry)));
         }
 
         final AtomicInteger passedCount = new AtomicInteger();
-        Runnable run = new Runnable() {
+        final Runnable run = new Runnable() {
             @Override
             public void run() {
-                for (ZipArchiveEntry entry: Collections.list(zf.getEntries())) {
+                for (final ZipArchiveEntry entry: Collections.list(zf.getEntries())) {
                     assertAllReadMethods(content.get(entry.getName()), zf, entry);
                 }
                 passedCount.incrementAndGet();
             }
         };
-        Thread t0 = new Thread(run);
-        Thread t1 = new Thread(run);
+        final Thread t0 = new Thread(run);
+        final Thread t1 = new Thread(run);
         t0.start();
         t1.start();
         t0.join();
@@ -428,11 +428,11 @@ public class ZipFileTest {
         // mixed.zip contains both inflated and stored files
         final File archive = getFile("mixed.zip");
         try (ZipFile zf = new ZipFile(archive)) {
-            ZipArchiveEntry inflatedEntry = zf.getEntry("inflated.txt");
+            final ZipArchiveEntry inflatedEntry = zf.getEntry("inflated.txt");
             Assert.assertEquals(0x0000, inflatedEntry.getLocalHeaderOffset());
             Assert.assertEquals(0x0046, inflatedEntry.getDataOffset());
             Assert.assertTrue(inflatedEntry.isStreamContiguous());
-            ZipArchiveEntry storedEntry = zf.getEntry("stored.txt");
+            final ZipArchiveEntry storedEntry = zf.getEntry("stored.txt");
             Assert.assertEquals(0x5892, storedEntry.getLocalHeaderOffset());
             Assert.assertEquals(0x58d6, storedEntry.getDataOffset());
             Assert.assertTrue(inflatedEntry.isStreamContiguous());
@@ -444,16 +444,16 @@ public class ZipFileTest {
      */
     @Test
     public void testDelayedOffsetsAndSizes() throws Exception {
-        ByteArrayOutputStream zipContent = new ByteArrayOutputStream();
+        final ByteArrayOutputStream zipContent = new ByteArrayOutputStream();
         try (ZipArchiveOutputStream zipOutput = new ZipArchiveOutputStream(zipContent)) {
-            ZipArchiveEntry inflatedEntry = new ZipArchiveEntry("inflated.txt");
+            final ZipArchiveEntry inflatedEntry = new ZipArchiveEntry("inflated.txt");
             inflatedEntry.setMethod(ZipEntry.DEFLATED);
             zipOutput.putArchiveEntry(inflatedEntry);
             zipOutput.write("Hello Deflated\n".getBytes());
             zipOutput.closeArchiveEntry();
 
-            byte[] storedContent = "Hello Stored\n".getBytes();
-            ZipArchiveEntry storedEntry = new ZipArchiveEntry("stored.txt");
+            final byte[] storedContent = "Hello Stored\n".getBytes();
+            final ZipArchiveEntry storedEntry = new ZipArchiveEntry("stored.txt");
             storedEntry.setMethod(ZipEntry.STORED);
             storedEntry.setSize(storedContent.length);
             storedEntry.setCrc(calculateCrc32(storedContent));
@@ -464,13 +464,13 @@ public class ZipFileTest {
         }
 
         try (ZipFile zf = new ZipFile(new SeekableInMemoryByteChannel(zipContent.toByteArray()))) {
-            ZipArchiveEntry inflatedEntry = zf.getEntry("inflated.txt");
+            final ZipArchiveEntry inflatedEntry = zf.getEntry("inflated.txt");
             Assert.assertNotEquals(-1L, inflatedEntry.getLocalHeaderOffset());
             Assert.assertNotEquals(-1L, inflatedEntry.getDataOffset());
             Assert.assertTrue(inflatedEntry.isStreamContiguous());
             Assert.assertNotEquals(-1L, inflatedEntry.getCompressedSize());
             Assert.assertNotEquals(-1L, inflatedEntry.getSize());
-            ZipArchiveEntry storedEntry = zf.getEntry("stored.txt");
+            final ZipArchiveEntry storedEntry = zf.getEntry("stored.txt");
             Assert.assertNotEquals(-1L, storedEntry.getLocalHeaderOffset());
             Assert.assertNotEquals(-1L, storedEntry.getDataOffset());
             Assert.assertTrue(inflatedEntry.isStreamContiguous());
@@ -484,23 +484,23 @@ public class ZipFileTest {
      */
     @Test
     public void testEntryAlignment() throws Exception {
-        SeekableInMemoryByteChannel zipContent = new SeekableInMemoryByteChannel();
+        final SeekableInMemoryByteChannel zipContent = new SeekableInMemoryByteChannel();
         try (ZipArchiveOutputStream zipOutput = new ZipArchiveOutputStream(zipContent)) {
-            ZipArchiveEntry inflatedEntry = new ZipArchiveEntry("inflated.txt");
+            final ZipArchiveEntry inflatedEntry = new ZipArchiveEntry("inflated.txt");
             inflatedEntry.setMethod(ZipEntry.DEFLATED);
             inflatedEntry.setAlignment(1024);
             zipOutput.putArchiveEntry(inflatedEntry);
             zipOutput.write("Hello Deflated\n".getBytes(StandardCharsets.UTF_8));
             zipOutput.closeArchiveEntry();
 
-            ZipArchiveEntry storedEntry = new ZipArchiveEntry("stored.txt");
+            final ZipArchiveEntry storedEntry = new ZipArchiveEntry("stored.txt");
             storedEntry.setMethod(ZipEntry.STORED);
             storedEntry.setAlignment(1024);
             zipOutput.putArchiveEntry(storedEntry);
             zipOutput.write("Hello Stored\n".getBytes(StandardCharsets.UTF_8));
             zipOutput.closeArchiveEntry();
 
-            ZipArchiveEntry storedEntry2 = new ZipArchiveEntry("stored2.txt");
+            final ZipArchiveEntry storedEntry2 = new ZipArchiveEntry("stored2.txt");
             storedEntry2.setMethod(ZipEntry.STORED);
             storedEntry2.setAlignment(1024);
             storedEntry2.addExtraField(new ResourceAlignmentExtraField(1));
@@ -508,7 +508,7 @@ public class ZipFileTest {
             zipOutput.write("Hello overload-alignment Stored\n".getBytes(StandardCharsets.UTF_8));
             zipOutput.closeArchiveEntry();
 
-            ZipArchiveEntry storedEntry3 = new ZipArchiveEntry("stored3.txt");
+            final ZipArchiveEntry storedEntry3 = new ZipArchiveEntry("stored3.txt");
             storedEntry3.setMethod(ZipEntry.STORED);
             storedEntry3.addExtraField(new ResourceAlignmentExtraField(1024));
             zipOutput.putArchiveEntry(storedEntry3);
@@ -520,8 +520,8 @@ public class ZipFileTest {
         try (ZipFile zf = new ZipFile(new SeekableInMemoryByteChannel(
                         Arrays.copyOfRange(zipContent.array(), 0, (int)zipContent.size())
         ))) {
-            ZipArchiveEntry inflatedEntry = zf.getEntry("inflated.txt");
-            ResourceAlignmentExtraField inflatedAlignmentEx =
+            final ZipArchiveEntry inflatedEntry = zf.getEntry("inflated.txt");
+            final ResourceAlignmentExtraField inflatedAlignmentEx =
                             (ResourceAlignmentExtraField)inflatedEntry.getExtraField(ResourceAlignmentExtraField.ID);
             assertNotEquals(-1L, inflatedEntry.getCompressedSize());
             assertNotEquals(-1L, inflatedEntry.getSize());
@@ -533,8 +533,8 @@ public class ZipFileTest {
                 Assert.assertEquals("Hello Deflated\n",
                                 new String(IOUtils.toByteArray(stream), StandardCharsets.UTF_8));
             }
-            ZipArchiveEntry storedEntry = zf.getEntry("stored.txt");
-            ResourceAlignmentExtraField storedAlignmentEx =
+            final ZipArchiveEntry storedEntry = zf.getEntry("stored.txt");
+            final ResourceAlignmentExtraField storedAlignmentEx =
                             (ResourceAlignmentExtraField)storedEntry.getExtraField(ResourceAlignmentExtraField.ID);
             assertNotEquals(-1L, storedEntry.getCompressedSize());
             assertNotEquals(-1L, storedEntry.getSize());
@@ -547,8 +547,8 @@ public class ZipFileTest {
                                 new String(IOUtils.toByteArray(stream), StandardCharsets.UTF_8));
             }
 
-            ZipArchiveEntry storedEntry2 = zf.getEntry("stored2.txt");
-            ResourceAlignmentExtraField stored2AlignmentEx =
+            final ZipArchiveEntry storedEntry2 = zf.getEntry("stored2.txt");
+            final ResourceAlignmentExtraField stored2AlignmentEx =
                             (ResourceAlignmentExtraField)storedEntry2.getExtraField(ResourceAlignmentExtraField.ID);
             assertNotEquals(-1L, storedEntry2.getCompressedSize());
             assertNotEquals(-1L, storedEntry2.getSize());
@@ -561,8 +561,8 @@ public class ZipFileTest {
                                 new String(IOUtils.toByteArray(stream), StandardCharsets.UTF_8));
             }
 
-            ZipArchiveEntry storedEntry3 = zf.getEntry("stored3.txt");
-            ResourceAlignmentExtraField stored3AlignmentEx =
+            final ZipArchiveEntry storedEntry3 = zf.getEntry("stored3.txt");
+            final ResourceAlignmentExtraField stored3AlignmentEx =
                             (ResourceAlignmentExtraField)storedEntry3.getExtraField(ResourceAlignmentExtraField.ID);
             assertNotEquals(-1L, storedEntry3.getCompressedSize());
             assertNotEquals(-1L, storedEntry3.getSize());
@@ -582,9 +582,9 @@ public class ZipFileTest {
      */
     @Test(expected = IllegalArgumentException.class)
     public void testEntryAlignmentExceed() throws Exception {
-        SeekableInMemoryByteChannel zipContent = new SeekableInMemoryByteChannel();
+        final SeekableInMemoryByteChannel zipContent = new SeekableInMemoryByteChannel();
         try (ZipArchiveOutputStream zipOutput = new ZipArchiveOutputStream(zipContent)) {
-            ZipArchiveEntry inflatedEntry = new ZipArchiveEntry("inflated.txt");
+            final ZipArchiveEntry inflatedEntry = new ZipArchiveEntry("inflated.txt");
             inflatedEntry.setMethod(ZipEntry.STORED);
             inflatedEntry.setAlignment(0x20000);
         }
@@ -595,7 +595,7 @@ public class ZipFileTest {
      */
     @Test(expected = IllegalArgumentException.class)
     public void testInvalidAlignment() throws Exception {
-        ZipArchiveEntry entry = new ZipArchiveEntry("dummy");
+        final ZipArchiveEntry entry = new ZipArchiveEntry("dummy");
         entry.setAlignment(3);
     }
 
@@ -625,10 +625,10 @@ public class ZipFileTest {
         final File archive = getFile("COMPRESS-380/COMPRESS-380.zip");
         try (FileInputStream in = new FileInputStream(input);
              ZipFile zf = new ZipFile(archive)) {
-            byte[] orig = IOUtils.toByteArray(in);
-            ZipArchiveEntry e = zf.getEntry("input2");
+            final byte[] orig = IOUtils.toByteArray(in);
+            final ZipArchiveEntry e = zf.getEntry("input2");
             try (InputStream s = zf.getInputStream(e)) {
-                byte[] fromZip = IOUtils.toByteArray(s);
+                final byte[] fromZip = IOUtils.toByteArray(s);
                 assertArrayEquals(orig, fromZip);
             }
         }
@@ -664,9 +664,9 @@ public class ZipFileTest {
         singleByteReadConsistentlyReturnsMinusOneAtEof(getFile("bzip2-zip.zip"));
     }
 
-    private void singleByteReadConsistentlyReturnsMinusOneAtEof(File file) throws Exception {
+    private void singleByteReadConsistentlyReturnsMinusOneAtEof(final File file) throws Exception {
         try (ZipFile archive = new ZipFile(file)) {
-            ZipArchiveEntry e = archive.getEntries().nextElement();
+            final ZipArchiveEntry e = archive.getEntries().nextElement();
             try (InputStream is = archive.getInputStream(e)) {
                 IOUtils.toByteArray(is);
                 assertEquals(-1, is.read());
@@ -707,8 +707,8 @@ public class ZipFileTest {
 
     @Test
     public void extractFileLiesAcrossSplitZipSegmentsCreatedByZip() throws Exception {
-        File lastFile = getFile("COMPRESS-477/split_zip_created_by_zip/split_zip_created_by_zip.zip");
-        SeekableByteChannel channel = ZipSplitReadOnlySeekableByteChannel.buildFromLastSplitSegment(lastFile);
+        final File lastFile = getFile("COMPRESS-477/split_zip_created_by_zip/split_zip_created_by_zip.zip");
+        final SeekableByteChannel channel = ZipSplitReadOnlySeekableByteChannel.buildFromLastSplitSegment(lastFile);
         zf = new ZipFile(channel);
 
         // the compressed content of UnsupportedCompressionAlgorithmException.java lies between .z01 and .z02
@@ -724,8 +724,8 @@ public class ZipFileTest {
 
     @Test
     public void extractFileLiesAcrossSplitZipSegmentsCreatedByZipOfZip64() throws Exception {
-        File lastFile = getFile("COMPRESS-477/split_zip_created_by_zip/split_zip_created_by_zip_zip64.zip");
-        SeekableByteChannel channel = ZipSplitReadOnlySeekableByteChannel.buildFromLastSplitSegment(lastFile);
+        final File lastFile = getFile("COMPRESS-477/split_zip_created_by_zip/split_zip_created_by_zip_zip64.zip");
+        final SeekableByteChannel channel = ZipSplitReadOnlySeekableByteChannel.buildFromLastSplitSegment(lastFile);
         zf = new ZipFile(channel);
 
         // the compressed content of UnsupportedCompressionAlgorithmException.java lies between .z01 and .z02
@@ -741,13 +741,13 @@ public class ZipFileTest {
 
     @Test
     public void extractFileLiesAcrossSplitZipSegmentsCreatedByWinrar() throws Exception {
-        File lastFile = getFile("COMPRESS-477/split_zip_created_by_winrar/split_zip_created_by_winrar.zip");
-        SeekableByteChannel channel = ZipSplitReadOnlySeekableByteChannel.buildFromLastSplitSegment(lastFile);
+        final File lastFile = getFile("COMPRESS-477/split_zip_created_by_winrar/split_zip_created_by_winrar.zip");
+        final SeekableByteChannel channel = ZipSplitReadOnlySeekableByteChannel.buildFromLastSplitSegment(lastFile);
         zf = new ZipFile(channel);
 
         // the compressed content of ZipArchiveInputStream.java lies between .z01 and .z02
-        ZipArchiveEntry zipEntry = zf.getEntry("commons-compress/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java");
-        File fileToCompare = getFile("COMPRESS-477/split_zip_created_by_winrar/file_to_compare_1");
+        final ZipArchiveEntry zipEntry = zf.getEntry("commons-compress/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java");
+        final File fileToCompare = getFile("COMPRESS-477/split_zip_created_by_winrar/file_to_compare_1");
         assertFileEqualsToEntry(fileToCompare, zipEntry, zf);
     }
 
@@ -763,10 +763,10 @@ public class ZipFileTest {
         outputStream.setLevel(Deflater.BEST_COMPRESSION + 1);
     }
 
-    private void multiByteReadConsistentlyReturnsMinusOneAtEof(File file) throws Exception {
-        byte[] buf = new byte[2];
+    private void multiByteReadConsistentlyReturnsMinusOneAtEof(final File file) throws Exception {
+        final byte[] buf = new byte[2];
         try (ZipFile archive = new ZipFile(file)) {
-            ZipArchiveEntry e = archive.getEntries().nextElement();
+            final ZipArchiveEntry e = archive.getEntries().nextElement();
             try (InputStream is = archive.getInputStream(e)) {
                 IOUtils.toByteArray(is);
                 assertEquals(-1, is.read(buf));
@@ -775,21 +775,21 @@ public class ZipFileTest {
         }
     }
 
-    private void assertAllReadMethods(byte[] expected, ZipFile zipFile, ZipArchiveEntry entry) {
+    private void assertAllReadMethods(final byte[] expected, final ZipFile zipFile, final ZipArchiveEntry entry) {
         // simple IOUtil read
         try (InputStream stream = zf.getInputStream(entry)) {
-            byte[] full = IOUtils.toByteArray(stream);
+            final byte[] full = IOUtils.toByteArray(stream);
             assertArrayEquals(expected, full);
         }
-        catch (IOException ex) {
+        catch (final IOException ex) {
             throw new RuntimeException(ex);
         }
 
         // big buffer at the beginning and then chunks by IOUtils read
         try (InputStream stream = zf.getInputStream(entry)) {
             byte[] full;
-            byte[] bytes = new byte[0x40000];
-            int read = stream.read(bytes);
+            final byte[] bytes = new byte[0x40000];
+            final int read = stream.read(bytes);
             if (read < 0) {
                 full = new byte[0];
             }
@@ -798,21 +798,21 @@ public class ZipFileTest {
             }
             assertArrayEquals(expected, full);
         }
-        catch (IOException ex) {
+        catch (final IOException ex) {
             throw new RuntimeException(ex);
         }
 
         // small chunk / single byte and big buffer then
         try (InputStream stream = zf.getInputStream(entry)) {
             byte[] full;
-            int single = stream.read();
+            final int single = stream.read();
             if (single < 0) {
                 full = new byte[0];
             }
             else {
-                byte[] big = new byte[0x40000];
+                final byte[] big = new byte[0x40000];
                 big[0] = (byte)single;
-                int read = stream.read(big, 1, big.length-1);
+                final int read = stream.read(big, 1, big.length-1);
                 if (read < 0) {
                     full = new byte[]{ (byte)single };
                 }
@@ -822,7 +822,7 @@ public class ZipFileTest {
             }
             assertArrayEquals(expected, full);
         }
-        catch (IOException ex) {
+        catch (final IOException ex) {
             throw new RuntimeException(ex);
         }
     }
@@ -830,16 +830,16 @@ public class ZipFileTest {
     /**
      * Utility to append the rest of the stream to already read data.
      */
-    private byte[] readStreamRest(byte[] beginning, int length, InputStream stream) throws IOException {
-        byte[] rest = IOUtils.toByteArray(stream);
-        byte[] full = new byte[length+rest.length];
+    private byte[] readStreamRest(final byte[] beginning, final int length, final InputStream stream) throws IOException {
+        final byte[] rest = IOUtils.toByteArray(stream);
+        final byte[] full = new byte[length+rest.length];
         System.arraycopy(beginning, 0, full, 0, length);
         System.arraycopy(rest, 0, full, length, rest.length);
         return full;
     }
 
-    private long calculateCrc32(byte[] content) {
-        CRC32 crc = new CRC32();
+    private long calculateCrc32(final byte[] content) {
+        final CRC32 crc = new CRC32();
         crc.update(content);
         return crc.getValue();
     }
@@ -868,19 +868,19 @@ public class ZipFileTest {
                      ze.getName());
     }
 
-    private static void nameSource(String archive, String entry, ZipArchiveEntry.NameSource expected) throws Exception {
+    private static void nameSource(final String archive, final String entry, final ZipArchiveEntry.NameSource expected) throws Exception {
         try (ZipFile zf = new ZipFile(getFile(archive))) {
-            ZipArchiveEntry ze = zf.getEntry(entry);
+            final ZipArchiveEntry ze = zf.getEntry(entry);
             assertEquals(entry, ze.getName());
             assertEquals(expected, ze.getNameSource());
         }
     }
 
-    private void assertFileEqualsToEntry(File fileToCompare, ZipArchiveEntry entry, ZipFile zipFile) throws IOException {
-        byte[] buffer = new byte[10240];
-        File tempFile = File.createTempFile("temp","txt");
-        OutputStream outputStream = new FileOutputStream(tempFile);
-        InputStream inputStream = zipFile.getInputStream(entry);
+    private void assertFileEqualsToEntry(final File fileToCompare, final ZipArchiveEntry entry, final ZipFile zipFile) throws IOException {
+        final byte[] buffer = new byte[10240];
+        final File tempFile = File.createTempFile("temp","txt");
+        final OutputStream outputStream = new FileOutputStream(tempFile);
+        final InputStream inputStream = zipFile.getInputStream(entry);
         int readLen;
         while((readLen = inputStream.read(buffer)) > 0) {
             outputStream.write(buffer, 0, readLen);
@@ -892,9 +892,9 @@ public class ZipFileTest {
         assertFileEqualIgnoreEndOfLine(fileToCompare, tempFile);
     }
 
-    private void assertFileEqualIgnoreEndOfLine(File file1, File file2) throws IOException {
-        List<String> linesOfFile1 = Files.readAllLines(Paths.get(file1.getCanonicalPath()), StandardCharsets.UTF_8);
-        List<String> linesOfFile2 = Files.readAllLines(Paths.get(file2.getCanonicalPath()), StandardCharsets.UTF_8);
+    private void assertFileEqualIgnoreEndOfLine(final File file1, final File file2) throws IOException {
+        final List<String> linesOfFile1 = Files.readAllLines(Paths.get(file1.getCanonicalPath()), StandardCharsets.UTF_8);
+        final List<String> linesOfFile2 = Files.readAllLines(Paths.get(file2.getCanonicalPath()), StandardCharsets.UTF_8);
 
         if(linesOfFile1.size() != linesOfFile2.size()) {
             fail("files not equal : " + file1.getName() + " , " + file2.getName());
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStreamTest.java
index 4889e58..26d6346 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStreamTest.java
@@ -48,18 +48,18 @@ public class ZipSplitOutputStreamTest extends AbstractTestCase {
     @Test
     public void throwsIfUnsplittableSizeLargerThanSplitSize() throws IOException {
         thrown.expect(IllegalArgumentException.class);
-        long splitSize = 100 * 1024;
-        ZipSplitOutputStream output = new ZipSplitOutputStream(File.createTempFile("temp", "zip"), splitSize);
+        final long splitSize = 100 * 1024;
+        final ZipSplitOutputStream output = new ZipSplitOutputStream(File.createTempFile("temp", "zip"), splitSize);
         output.prepareToWriteUnsplittableContent(splitSize + 1);
     }
 
     @Test
     public void splitZipBeginsWithZipSplitSignature() throws IOException {
-        File tempFile = File.createTempFile("temp", "zip");
+        final File tempFile = File.createTempFile("temp", "zip");
         new ZipSplitOutputStream(tempFile, 100 * 1024L);
 
-        InputStream inputStream = new FileInputStream(tempFile);
-        byte[] buffer = new byte[4];
+        final InputStream inputStream = new FileInputStream(tempFile);
+        final byte[] buffer = new byte[4];
         inputStream.read(buffer);
 
         Assert.assertEquals(ByteBuffer.wrap(ZipArchiveOutputStream.DD_SIG).getInt(), ByteBuffer.wrap(buffer).getInt());
@@ -67,13 +67,13 @@ public class ZipSplitOutputStreamTest extends AbstractTestCase {
 
     @Test
     public void testCreateSplittedFiles() throws IOException {
-        File testOutputFile = new File(dir, "testCreateSplittedFiles.zip");
-        int splitSize = 100 * 1024; /* 100KB */
-        ZipSplitOutputStream zipSplitOutputStream = new ZipSplitOutputStream(testOutputFile, splitSize);
+        final File testOutputFile = new File(dir, "testCreateSplittedFiles.zip");
+        final int splitSize = 100 * 1024; /* 100KB */
+        final ZipSplitOutputStream zipSplitOutputStream = new ZipSplitOutputStream(testOutputFile, splitSize);
 
-        File fileToTest = getFile("COMPRESS-477/split_zip_created_by_zip/zip_to_compare_created_by_zip.zip");
-        InputStream inputStream = new FileInputStream(fileToTest);
-        byte[] buffer = new byte[4096];
+        final File fileToTest = getFile("COMPRESS-477/split_zip_created_by_zip/zip_to_compare_created_by_zip.zip");
+        final InputStream inputStream = new FileInputStream(fileToTest);
+        final byte[] buffer = new byte[4096];
         int readLen;
 
         while ((readLen = inputStream.read(buffer)) > 0) {
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipUtilTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipUtilTest.java
index fda8121..46eb551 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipUtilTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipUtilTest.java
@@ -248,14 +248,14 @@ public class ZipUtilTest {
 
     @Test(expected = UnsupportedZipFeatureException.class)
     public void testUnsupportedMethod() throws Exception {
-        ZipArchiveEntry ze = new ZipArchiveEntry();
+        final ZipArchiveEntry ze = new ZipArchiveEntry();
         ze.setMethod(ZipMethod.EXPANDING_LEVEL_1.getCode());
         ZipUtil.checkRequestedFeatures(ze);
     }
 
     @Test(expected = UnsupportedZipFeatureException.class)
     public void testUnknownMethod() throws Exception {
-        ZipArchiveEntry ze = new ZipArchiveEntry();
+        final ZipArchiveEntry ze = new ZipArchiveEntry();
         ze.setMethod(100);
         ZipUtil.checkRequestedFeatures(ze);
     }
diff --git a/src/test/java/org/apache/commons/compress/changes/ChangeTest.java b/src/test/java/org/apache/commons/compress/changes/ChangeTest.java
index 907041c..89596f0 100644
--- a/src/test/java/org/apache/commons/compress/changes/ChangeTest.java
+++ b/src/test/java/org/apache/commons/compress/changes/ChangeTest.java
@@ -36,9 +36,9 @@ public class ChangeTest {
     @Test(expected = NullPointerException.class)
     public void testFailsToCreateChangeTakingFourArgumentsThrowsNullPointerExceptionOne() {
 
-        MemoryArchiveEntry memoryArchiveEntry = new MemoryArchiveEntry("x");
+        final MemoryArchiveEntry memoryArchiveEntry = new MemoryArchiveEntry("x");
 
-        Change change  = new Change(memoryArchiveEntry, null, false);
+        final Change change  = new Change(memoryArchiveEntry, null, false);
 
     }
 
@@ -46,9 +46,9 @@ public class ChangeTest {
     @Test(expected = NullPointerException.class)
     public void testFailsToCreateChangeTakingFourArgumentsThrowsNullPointerExceptionTwo() {
 
-        PipedInputStream pipedInputStream = new PipedInputStream(1);
+        final PipedInputStream pipedInputStream = new PipedInputStream(1);
 
-        Change change  = new Change(null, pipedInputStream, false);
+        final Change change  = new Change(null, pipedInputStream, false);
 
     }
 
@@ -56,7 +56,7 @@ public class ChangeTest {
     @Test(expected = NullPointerException.class)
     public void testFailsToCreateChangeTakingThreeArgumentsThrowsNullPointerException() {
 
-        Change change  = new Change(null, (-407));
+        final Change change  = new Change(null, (-407));
 
     }
 
diff --git a/src/test/java/org/apache/commons/compress/compressors/DetectCompressorTestCase.java b/src/test/java/org/apache/commons/compress/compressors/DetectCompressorTestCase.java
index cb96126..aa07498 100644
--- a/src/test/java/org/apache/commons/compress/compressors/DetectCompressorTestCase.java
+++ b/src/test/java/org/apache/commons/compress/compressors/DetectCompressorTestCase.java
@@ -147,28 +147,28 @@ public final class DetectCompressorTestCase {
         try {
             CompressorStreamFactory.detect(new BufferedInputStream(new ByteArrayInputStream(new byte[0])));
             fail("shouldn't be able to detect empty stream");
-        } catch (CompressorException e) {
+        } catch (final CompressorException e) {
             assertEquals("No Compressor found for the stream signature.", e.getMessage());
         }
 
         try {
             CompressorStreamFactory.detect(null);
             fail("shouldn't be able to detect null stream");
-        } catch (IllegalArgumentException e) {
+        } catch (final IllegalArgumentException e) {
             assertEquals("Stream must not be null.", e.getMessage());
         }
 
         try {
             CompressorStreamFactory.detect(new BufferedInputStream(new MockEvilInputStream()));
             fail("Expected IOException");
-        } catch (CompressorException e) {
+        } catch (final CompressorException e) {
             assertEquals("IOException while reading signature.", e.getMessage());
         }
 
 
     }
 
-    private String detect(String testFileName) throws IOException, CompressorException {
+    private String detect(final String testFileName) throws IOException, CompressorException {
         String name = null;
         try (InputStream is = new BufferedInputStream(
                 new FileInputStream(getFile(testFileName)))) {
@@ -208,13 +208,13 @@ public final class DetectCompressorTestCase {
     }
 
     private InputStream getStreamFor(final String fileName, final int memoryLimitInKb) throws Exception {
-        CompressorStreamFactory fac = new CompressorStreamFactory(true,
+        final CompressorStreamFactory fac = new CompressorStreamFactory(true,
                 memoryLimitInKb);
-        InputStream is = new BufferedInputStream(
+        final InputStream is = new BufferedInputStream(
                 new FileInputStream(getFile(fileName)));
         try {
             return fac.createCompressorInputStream(is);
-        } catch (CompressorException e) {
+        } catch (final CompressorException e) {
             if (e.getCause() != null && e.getCause() instanceof Exception) {
                 //unwrap cause to reveal MemoryLimitException
                 throw (Exception)e.getCause();
diff --git a/src/test/java/org/apache/commons/compress/compressors/FramedSnappyTestCase.java b/src/test/java/org/apache/commons/compress/compressors/FramedSnappyTestCase.java
index 133c7fe..868b8ea 100644
--- a/src/test/java/org/apache/commons/compress/compressors/FramedSnappyTestCase.java
+++ b/src/test/java/org/apache/commons/compress/compressors/FramedSnappyTestCase.java
@@ -105,20 +105,20 @@ public final class FramedSnappyTestCase
 
     @Test
     public void testRoundtripWithOneBigWrite() throws Exception {
-        Random r = new Random();
-        File input = new File(dir, "bigChunkTest");
+        final Random r = new Random();
+        final File input = new File(dir, "bigChunkTest");
         try (FileOutputStream fs = new FileOutputStream(input)) {
             for (int i = 0 ; i < 1 << 17; i++) {
                 fs.write(r.nextInt(256));
             }
         }
-        long start = System.currentTimeMillis();
+        final long start = System.currentTimeMillis();
         final File outputSz = new File(dir, input.getName() + ".sz");
         try (FileInputStream is = new FileInputStream(input);
              FileOutputStream os = new FileOutputStream(outputSz);
              CompressorOutputStream sos = new CompressorStreamFactory()
                  .createCompressorOutputStream("snappy-framed", os)) {
-            byte[] b = IOUtils.toByteArray(is);
+            final byte[] b = IOUtils.toByteArray(is);
             sos.write(b[0]);
             sos.write(b, 1, b.length - 1); // must be split into multiple compressed chunks
         }
@@ -127,14 +127,14 @@ public final class FramedSnappyTestCase
         try (FileInputStream is = new FileInputStream(input);
              CompressorInputStream sis = new CompressorStreamFactory()
                  .createCompressorInputStream("snappy-framed", new FileInputStream(outputSz))) {
-            byte[] expected = IOUtils.toByteArray(is);
-            byte[] actual = IOUtils.toByteArray(sis);
+            final byte[] expected = IOUtils.toByteArray(is);
+            final byte[] actual = IOUtils.toByteArray(sis);
             assertArrayEquals(expected, actual);
         }
     }
 
-    private void testRoundtrip(File input)  throws Exception {
-        long start = System.currentTimeMillis();
+    private void testRoundtrip(final File input)  throws Exception {
+        final long start = System.currentTimeMillis();
         final File outputSz = new File(dir, input.getName() + ".sz");
         try (FileInputStream is = new FileInputStream(input);
              FileOutputStream os = new FileOutputStream(outputSz);
@@ -147,8 +147,8 @@ public final class FramedSnappyTestCase
         try (FileInputStream is = new FileInputStream(input);
              CompressorInputStream sis = new CompressorStreamFactory()
                  .createCompressorInputStream("snappy-framed", new FileInputStream(outputSz))) {
-            byte[] expected = IOUtils.toByteArray(is);
-            byte[] actual = IOUtils.toByteArray(sis);
+            final byte[] expected = IOUtils.toByteArray(is);
+            final byte[] actual = IOUtils.toByteArray(sis);
             assertArrayEquals(expected, actual);
         }
     }
diff --git a/src/test/java/org/apache/commons/compress/compressors/GZipTestCase.java b/src/test/java/org/apache/commons/compress/compressors/GZipTestCase.java
index 9faa874..cf72611 100644
--- a/src/test/java/org/apache/commons/compress/compressors/GZipTestCase.java
+++ b/src/test/java/org/apache/commons/compress/compressors/GZipTestCase.java
@@ -296,7 +296,7 @@ public final class GZipTestCase extends AbstractTestCase {
     @Test
     public void multiByteReadConsistentlyReturnsMinusOneAtEof() throws IOException {
         final File input = getFile("bla.tgz");
-        byte[] buf = new byte[2];
+        final byte[] buf = new byte[2];
         try (InputStream is = new FileInputStream(input)) {
             final GzipCompressorInputStream in =
                     new GzipCompressorInputStream(is);
diff --git a/src/test/java/org/apache/commons/compress/compressors/LZMATestCase.java b/src/test/java/org/apache/commons/compress/compressors/LZMATestCase.java
index 3d2ab02..d5c717c 100644
--- a/src/test/java/org/apache/commons/compress/compressors/LZMATestCase.java
+++ b/src/test/java/org/apache/commons/compress/compressors/LZMATestCase.java
@@ -93,7 +93,7 @@ public final class LZMATestCase extends AbstractTestCase {
     @Test
     public void multiByteReadConsistentlyReturnsMinusOneAtEof() throws IOException {
         final File input = getFile("bla.tar.lzma");
-        byte[] buf = new byte[2];
+        final byte[] buf = new byte[2];
         try (InputStream is = new FileInputStream(input)) {
             final LZMACompressorInputStream in =
                     new LZMACompressorInputStream(is);
diff --git a/src/test/java/org/apache/commons/compress/compressors/Pack200TestCase.java b/src/test/java/org/apache/commons/compress/compressors/Pack200TestCase.java
index c622548..509963a 100644
--- a/src/test/java/org/apache/commons/compress/compressors/Pack200TestCase.java
+++ b/src/test/java/org/apache/commons/compress/compressors/Pack200TestCase.java
@@ -209,7 +209,7 @@ public final class Pack200TestCase extends AbstractTestCase {
         singleByteReadConsistentlyReturnsMinusOneAtEof(Pack200Strategy.TEMP_FILE);
     }
 
-    private void singleByteReadConsistentlyReturnsMinusOneAtEof(Pack200Strategy s) throws Exception {
+    private void singleByteReadConsistentlyReturnsMinusOneAtEof(final Pack200Strategy s) throws Exception {
         final File input = getFile("bla.pack");
         try (final Pack200CompressorInputStream in = new Pack200CompressorInputStream(input, s)) {
             IOUtils.toByteArray(in);
@@ -229,9 +229,9 @@ public final class Pack200TestCase extends AbstractTestCase {
         multiByteReadConsistentlyReturnsMinusOneAtEof(Pack200Strategy.TEMP_FILE);
     }
 
-    private void multiByteReadConsistentlyReturnsMinusOneAtEof(Pack200Strategy s) throws Exception {
+    private void multiByteReadConsistentlyReturnsMinusOneAtEof(final Pack200Strategy s) throws Exception {
         final File input = getFile("bla.pack");
-        byte[] buf = new byte[2];
+        final byte[] buf = new byte[2];
         try (final Pack200CompressorInputStream in = new Pack200CompressorInputStream(input, s)) {
             IOUtils.toByteArray(in);
             assertEquals(-1, in.read(buf));
diff --git a/src/test/java/org/apache/commons/compress/compressors/brotli/BrotliCompressorInputStreamTest.java b/src/test/java/org/apache/commons/compress/compressors/brotli/BrotliCompressorInputStreamTest.java
index f9ad366..579f451 100644
--- a/src/test/java/org/apache/commons/compress/compressors/brotli/BrotliCompressorInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/brotli/BrotliCompressorInputStreamTest.java
@@ -137,7 +137,7 @@ public class BrotliCompressorInputStreamTest extends AbstractTestCase {
     @Test
     public void multiByteReadConsistentlyReturnsMinusOneAtEof() throws IOException {
         final File input = getFile("brotli.testdata.compressed");
-        byte[] buf = new byte[2];
+        final byte[] buf = new byte[2];
         try (InputStream is = new FileInputStream(input)) {
             final BrotliCompressorInputStream in =
                     new BrotliCompressorInputStream(is);
diff --git a/src/test/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStreamTest.java b/src/test/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStreamTest.java
index f9ae9cc..af5028c 100644
--- a/src/test/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStreamTest.java
@@ -37,7 +37,7 @@ public class BZip2CompressorInputStreamTest {
     @Test(expected = IOException.class)
     public void shouldThrowAnIOExceptionWhenAppliedToAZipFile() throws Exception {
         try (FileInputStream in = new FileInputStream(getFile("bla.zip"))) {
-            BZip2CompressorInputStream bis = new BZip2CompressorInputStream(in);
+            final BZip2CompressorInputStream bis = new BZip2CompressorInputStream(in);
             bis.close();
         }
     }
@@ -88,7 +88,7 @@ public class BZip2CompressorInputStreamTest {
     @Test
     public void multiByteReadConsistentlyReturnsMinusOneAtEof() throws IOException {
         final File input = getFile("bla.txt.bz2");
-        byte[] buf = new byte[2];
+        final byte[] buf = new byte[2];
         try (InputStream is = new FileInputStream(input)) {
             final BZip2CompressorInputStream in =
                     new BZip2CompressorInputStream(is);
diff --git a/src/test/java/org/apache/commons/compress/compressors/deflate/DeflateCompressorInputStreamTest.java b/src/test/java/org/apache/commons/compress/compressors/deflate/DeflateCompressorInputStreamTest.java
index 97a010f..9c1b218 100644
--- a/src/test/java/org/apache/commons/compress/compressors/deflate/DeflateCompressorInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/deflate/DeflateCompressorInputStreamTest.java
@@ -80,7 +80,7 @@ public class DeflateCompressorInputStreamTest {
     @Test
     public void multiByteReadConsistentlyReturnsMinusOneAtEof() throws IOException {
         final File input = AbstractTestCase.getFile("bla.tar.deflatez");
-        byte[] buf = new byte[2];
+        final byte[] buf = new byte[2];
         try (InputStream is = new FileInputStream(input)) {
             final DeflateCompressorInputStream in =
                     new DeflateCompressorInputStream(is);
diff --git a/src/test/java/org/apache/commons/compress/compressors/deflate64/Deflate64BugsTest.java b/src/test/java/org/apache/commons/compress/compressors/deflate64/Deflate64BugsTest.java
index d21f052..1a445cc 100644
--- a/src/test/java/org/apache/commons/compress/compressors/deflate64/Deflate64BugsTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/deflate64/Deflate64BugsTest.java
@@ -31,13 +31,13 @@ public class Deflate64BugsTest {
     @Test
     public void readBeyondMemoryException() throws Exception {
         try (ZipFile zfile = new ZipFile(getFile("COMPRESS-380/COMPRESS-380-readbeyondmemory.zip"))) {
-            Enumeration<ZipArchiveEntry> entries = zfile.getEntries();
+            final Enumeration<ZipArchiveEntry> entries = zfile.getEntries();
             while (entries.hasMoreElements()) {
-                ZipArchiveEntry e = entries.nextElement();
-                byte [] buf = new byte [1024 * 8];
+                final ZipArchiveEntry e = entries.nextElement();
+                final byte [] buf = new byte [1024 * 8];
                 try (InputStream is = zfile.getInputStream(e)) {
                     while (true) {
-                        int read = is.read(buf);
+                        final int read = is.read(buf);
                         if (read == -1) {
                             break;
                         }
diff --git a/src/test/java/org/apache/commons/compress/compressors/deflate64/Deflate64CompressorInputStreamTest.java b/src/test/java/org/apache/commons/compress/compressors/deflate64/Deflate64CompressorInputStreamTest.java
index 5676738..27d863d 100644
--- a/src/test/java/org/apache/commons/compress/compressors/deflate64/Deflate64CompressorInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/deflate64/Deflate64CompressorInputStreamTest.java
@@ -45,7 +45,7 @@ public class Deflate64CompressorInputStreamTest {
 
     @Test
     public void readWhenClosed() throws Exception {
-        Deflate64CompressorInputStream input = new Deflate64CompressorInputStream(nullDecoder);
+        final Deflate64CompressorInputStream input = new Deflate64CompressorInputStream(nullDecoder);
         assertEquals(-1, input.read());
         assertEquals(-1, input.read(new byte[1]));
         assertEquals(-1, input.read(new byte[1], 0, 1));
@@ -53,7 +53,7 @@ public class Deflate64CompressorInputStreamTest {
 
     @Test
     public void properSizeWhenClosed() throws Exception {
-        Deflate64CompressorInputStream input = new Deflate64CompressorInputStream(nullDecoder);
+        final Deflate64CompressorInputStream input = new Deflate64CompressorInputStream(nullDecoder);
         assertEquals(0, input.available());
     }
 
@@ -61,14 +61,14 @@ public class Deflate64CompressorInputStreamTest {
     public void delegatesAvailable() throws Exception {
         Mockito.when(decoder.available()).thenReturn(1024);
 
-        Deflate64CompressorInputStream input = new Deflate64CompressorInputStream(decoder);
+        final Deflate64CompressorInputStream input = new Deflate64CompressorInputStream(decoder);
         assertEquals(1024, input.available());
     }
 
     @Test
     public void closeCallsDecoder() throws Exception {
 
-        Deflate64CompressorInputStream input = new Deflate64CompressorInputStream(decoder);
+        final Deflate64CompressorInputStream input = new Deflate64CompressorInputStream(decoder);
         input.close();
 
         Mockito.verify(decoder, times(1)).close();
@@ -77,7 +77,7 @@ public class Deflate64CompressorInputStreamTest {
     @Test
     public void closeIsDelegatedJustOnce() throws Exception {
 
-        Deflate64CompressorInputStream input = new Deflate64CompressorInputStream(decoder);
+        final Deflate64CompressorInputStream input = new Deflate64CompressorInputStream(decoder);
 
         input.close();
         input.close();
@@ -87,7 +87,7 @@ public class Deflate64CompressorInputStreamTest {
 
     @Test
     public void uncompressedBlock() throws Exception {
-        byte[] data = {
+        final byte[] data = {
             1, 11, 0, -12, -1,
             'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd'
         };
@@ -101,7 +101,7 @@ public class Deflate64CompressorInputStreamTest {
 
     @Test
     public void uncompressedBlockViaFactory() throws Exception {
-        byte[] data = {
+        final byte[] data = {
             1, 11, 0, -12, -1,
             'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd'
         };
@@ -116,7 +116,7 @@ public class Deflate64CompressorInputStreamTest {
 
     @Test
     public void uncompressedBlockAvailable() throws Exception {
-        byte[] data = {
+        final byte[] data = {
             1, 11, 0, -12, -1,
             'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd'
         };
@@ -130,7 +130,7 @@ public class Deflate64CompressorInputStreamTest {
     @Test
     public void streamIgnoresExtraBytesAfterDeflatedInput() throws Exception
     {
-        byte[] data = {
+        final byte[] data = {
             1, 11, 0, -12, -1,
             'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', 'X'
         };
@@ -145,7 +145,7 @@ public class Deflate64CompressorInputStreamTest {
     @Test(expected = java.io.EOFException.class)
     public void throwsEOFExceptionOnTruncatedStreams() throws Exception
     {
-        byte[] data = {
+        final byte[] data = {
             1, 11, 0, -12, -1,
             'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l',
         };
@@ -169,7 +169,7 @@ public class Deflate64CompressorInputStreamTest {
 
     @Test
     public void multiByteReadConsistentlyReturnsMinusOneAtEof() throws Exception {
-        byte[] buf = new byte[2];
+        final byte[] buf = new byte[2];
         try (final Deflate64CompressorInputStream in =
                     new Deflate64CompressorInputStream(nullDecoder)) {
             IOUtils.toByteArray(in);
diff --git a/src/test/java/org/apache/commons/compress/compressors/deflate64/HuffmanDecoderTest.java b/src/test/java/org/apache/commons/compress/compressors/deflate64/HuffmanDecoderTest.java
index bbfcd4c..2758137 100644
--- a/src/test/java/org/apache/commons/compress/compressors/deflate64/HuffmanDecoderTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/deflate64/HuffmanDecoderTest.java
@@ -28,15 +28,15 @@ import static org.junit.Assert.fail;
 public class HuffmanDecoderTest {
     @Test
     public void decodeUncompressedBlock() throws Exception {
-        byte[] data = {
+        final byte[] data = {
                 0b1, // end of block + no compression mode
                 11, 0, -12, -1, // len & ~len
                 'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd'
         };
 
-        HuffmanDecoder decoder = new HuffmanDecoder(new ByteArrayInputStream(data));
-        byte[] result = new byte[100];
-        int len = decoder.decode(result);
+        final HuffmanDecoder decoder = new HuffmanDecoder(new ByteArrayInputStream(data));
+        final byte[] result = new byte[100];
+        final int len = decoder.decode(result);
 
         assertEquals(11, len);
         assertEquals("Hello World", new String(result, 0, len));
@@ -44,25 +44,25 @@ public class HuffmanDecoderTest {
 
     @Test
     public void decodeUncompressedBlockWithInvalidLenNLenValue() throws Exception {
-        byte[] data = {
+        final byte[] data = {
                 0b1, // end of block + no compression mode
                 11, 0, -12, -2, // len & ~len
                 'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd'
         };
 
-        HuffmanDecoder decoder = new HuffmanDecoder(new ByteArrayInputStream(data));
-        byte[] result = new byte[100];
+        final HuffmanDecoder decoder = new HuffmanDecoder(new ByteArrayInputStream(data));
+        final byte[] result = new byte[100];
         try {
-            int len = decoder.decode(result);
+            final int len = decoder.decode(result);
             fail("Should have failed but returned " + len + " entries: " + Arrays.toString(Arrays.copyOf(result, len)));
-        } catch (IllegalStateException e) {
+        } catch (final IllegalStateException e) {
             assertEquals("Illegal LEN / NLEN values", e.getMessage());
         }
     }
 
     @Test
     public void decodeSimpleFixedHuffmanBlock() throws Exception {
-        byte[] data = {
+        final byte[] data = {
                 //|--- binary filling ---|76543210
                 0b11111111111111111111111111110011, // final block + fixed huffman + H
                 0b00000000000000000000000001001000, // H + e
@@ -79,9 +79,9 @@ public class HuffmanDecoderTest {
                 0b11111111111111111111111111111100 // end of block (00) + garbage
         };
 
-        HuffmanDecoder decoder = new HuffmanDecoder(new ByteArrayInputStream(data));
-        byte[] result = new byte[100];
-        int len = decoder.decode(result);
+        final HuffmanDecoder decoder = new HuffmanDecoder(new ByteArrayInputStream(data));
+        final byte[] result = new byte[100];
+        final int len = decoder.decode(result);
 
         assertEquals(11, len);
         assertEquals("Hello World", new String(result, 0, len));
@@ -89,7 +89,7 @@ public class HuffmanDecoderTest {
 
     @Test
     public void decodeSimpleFixedHuffmanBlockToSmallBuffer() throws Exception {
-        byte[] data = {
+        final byte[] data = {
                 //|--- binary filling ---|76543210
                 0b11111111111111111111111111110011, // final block + fixed huffman + H
                 0b00000000000000000000000001001000, // H + e
@@ -106,8 +106,8 @@ public class HuffmanDecoderTest {
                 0b11111111111111111111111111111100 // end of block (00) + garbage
         };
 
-        HuffmanDecoder decoder = new HuffmanDecoder(new ByteArrayInputStream(data));
-        byte[] result = new byte[10];
+        final HuffmanDecoder decoder = new HuffmanDecoder(new ByteArrayInputStream(data));
+        final byte[] result = new byte[10];
         int len;
         len = decoder.decode(result);
         assertEquals(10, len);
@@ -120,7 +120,7 @@ public class HuffmanDecoderTest {
 
     @Test
     public void decodeFixedHuffmanBlockWithMemoryLookup() throws Exception {
-        byte[] data = {
+        final byte[] data = {
                 //|--- binary filling ---|76543210
                 0b11111111111111111111111111110011, // final block + fixed huffman + H
                 0b00000000000000000000000001001000, // H + e
@@ -140,9 +140,9 @@ public class HuffmanDecoderTest {
                 0b11111111111111111111111111111000 // end of block (0000) + garbage
         };
 
-        HuffmanDecoder decoder = new HuffmanDecoder(new ByteArrayInputStream(data));
-        byte[] result = new byte[100];
-        int len = decoder.decode(result);
+        final HuffmanDecoder decoder = new HuffmanDecoder(new ByteArrayInputStream(data));
+        final byte[] result = new byte[100];
+        final int len = decoder.decode(result);
 
         assertEquals(48, len);
         assertEquals("Hello World\nHello World\nHello World\nHello World\n", new String(result, 0, len));
@@ -150,7 +150,7 @@ public class HuffmanDecoderTest {
 
     @Test
     public void decodeFixedHuffmanBlockWithMemoryLookupInSmallBuffer() throws Exception {
-        byte[] data = {
+        final byte[] data = {
                 //|--- binary filling ---|76543210
                 0b11111111111111111111111111110011, // final block + fixed huffman + H
                 0b00000000000000000000000001001000, // H + e
@@ -170,8 +170,8 @@ public class HuffmanDecoderTest {
                 0b11111111111111111111111111111000 // end of block (0000) + garbage
         };
 
-        HuffmanDecoder decoder = new HuffmanDecoder(new ByteArrayInputStream(data));
-        byte[] result = new byte[30];
+        final HuffmanDecoder decoder = new HuffmanDecoder(new ByteArrayInputStream(data));
+        final byte[] result = new byte[30];
         int len;
 
         len = decoder.decode(result);
@@ -185,7 +185,7 @@ public class HuffmanDecoderTest {
 
     @Test
     public void decodeFixedHuffmanBlockWithMemoryLookupInExactBuffer() throws Exception {
-        byte[] data = {
+        final byte[] data = {
                 //|--- binary filling ---|76543210
                 0b11111111111111111111111111110011, // final block + fixed huffman + H
                 0b00000000000000000000000001001000, // H + e
@@ -205,8 +205,8 @@ public class HuffmanDecoderTest {
                 0b11111111111111111111111111111000 // end of block (0000) + garbage
         };
 
-        HuffmanDecoder decoder = new HuffmanDecoder(new ByteArrayInputStream(data));
-        byte[] result = new byte[48];
+        final HuffmanDecoder decoder = new HuffmanDecoder(new ByteArrayInputStream(data));
+        final byte[] result = new byte[48];
         int len;
 
         len = decoder.decode(result);
diff --git a/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorInputStreamTest.java b/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorInputStreamTest.java
index 13331dd..a70f683 100644
--- a/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorInputStreamTest.java
@@ -33,8 +33,8 @@ public class BlockLZ4CompressorInputStreamTest extends AbstractTestCase {
     public void readBlaLz4() throws IOException {
         try (InputStream a = new BlockLZ4CompressorInputStream(new FileInputStream(getFile("bla.tar.block_lz4")));
             FileInputStream e = new FileInputStream(getFile("bla.tar"))) {
-            byte[] expected = IOUtils.toByteArray(e);
-            byte[] actual = IOUtils.toByteArray(a);
+            final byte[] expected = IOUtils.toByteArray(e);
+            final byte[] actual = IOUtils.toByteArray(a);
             Assert.assertArrayEquals(expected, actual);
         }
     }
@@ -55,7 +55,7 @@ public class BlockLZ4CompressorInputStreamTest extends AbstractTestCase {
     @Test
     public void multiByteReadConsistentlyReturnsMinusOneAtEof() throws IOException {
         final File input = getFile("bla.tar.block_lz4");
-        byte[] buf = new byte[2];
+        final byte[] buf = new byte[2];
         try (InputStream is = new FileInputStream(input)) {
             final BlockLZ4CompressorInputStream in =
                     new BlockLZ4CompressorInputStream(is);
diff --git a/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStreamTest.java b/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStreamTest.java
index fca3f88..7301938 100644
--- a/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStreamTest.java
@@ -31,7 +31,7 @@ public class BlockLZ4CompressorOutputStreamTest {
 
     @Test
     public void pairSeesBackReferenceWhenSet() {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
         Assert.assertFalse(p.hasBackReference());
         p.setBackReference(new LZ77Compressor.BackReference(1, 4));
         Assert.assertTrue(p.hasBackReference());
@@ -39,7 +39,7 @@ public class BlockLZ4CompressorOutputStreamTest {
 
     @Test
     public void canWriteBackReferenceFollowedByLongLiteral() {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
         p.setBackReference(new LZ77Compressor.BackReference(1, 4));
         // a length of 11 would be enough according to the spec, but
         // the algorithm we use for rewriting the last block requires
@@ -50,7 +50,7 @@ public class BlockLZ4CompressorOutputStreamTest {
     @Test
     @Ignore("would pass if the algorithm used for rewriting the final pairs was smarter")
     public void canWriteBackReferenceFollowedByShortLiteralIfOffsetIsBigEnough() {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
         p.setBackReference(new LZ77Compressor.BackReference(10, 4));
         Assert.assertTrue(p.canBeWritten(5));
     }
@@ -58,30 +58,30 @@ public class BlockLZ4CompressorOutputStreamTest {
     @Test
     @Ignore("would pass if the algorithm used for rewriting the final pairs was smarter")
     public void canWriteBackReferenceFollowedByShortLiteralIfLengthIsBigEnough() {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
         p.setBackReference(new LZ77Compressor.BackReference(1, 10));
         Assert.assertTrue(p.canBeWritten(5));
     }
 
     @Test
     public void cantWriteBackReferenceFollowedByLiteralThatIsTooShort() {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
         p.setBackReference(new LZ77Compressor.BackReference(10, 14));
         Assert.assertFalse(p.canBeWritten(4));
     }
 
     @Test
     public void cantWriteBackReferenceIfAccumulatedOffsetIsTooShort() {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
         p.setBackReference(new LZ77Compressor.BackReference(1, 4));
         Assert.assertFalse(p.canBeWritten(5));
     }
 
     @Test
     public void pairAccumulatesLengths() {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
         p.setBackReference(new LZ77Compressor.BackReference(1, 4));
-        byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+        final byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
         p.addLiteral(new LZ77Compressor.LiteralBlock(b, 1, 4));
         p.addLiteral(new LZ77Compressor.LiteralBlock(b, 2, 5));
         Assert.assertEquals(13, p.length());
@@ -89,57 +89,57 @@ public class BlockLZ4CompressorOutputStreamTest {
 
     @Test
     public void canWritePairWithoutLiterals() throws IOException {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
         p.setBackReference(new LZ77Compressor.BackReference(1, 4));
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        final ByteArrayOutputStream bos = new ByteArrayOutputStream();
         p.writeTo(bos);
         Assert.assertArrayEquals(new byte[] { 0, 1, 0 }, bos.toByteArray());
     }
 
     @Test
     public void writesCorrectSizeFor19ByteLengthBackReference() throws IOException {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
         p.setBackReference(new LZ77Compressor.BackReference(1, 19));
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        final ByteArrayOutputStream bos = new ByteArrayOutputStream();
         p.writeTo(bos);
         Assert.assertArrayEquals(new byte[] { 15, 1, 0, 0 }, bos.toByteArray());
     }
 
     @Test
     public void writesCorrectSizeFor273ByteLengthBackReference() throws IOException {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
         p.setBackReference(new LZ77Compressor.BackReference(1, 273));
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        final ByteArrayOutputStream bos = new ByteArrayOutputStream();
         p.writeTo(bos);
         Assert.assertArrayEquals(new byte[] { 15, 1, 0, (byte) 254 }, bos.toByteArray());
     }
 
     @Test
     public void writesCorrectSizeFor274ByteLengthBackReference() throws IOException {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
         p.setBackReference(new LZ77Compressor.BackReference(1, 274));
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        final ByteArrayOutputStream bos = new ByteArrayOutputStream();
         p.writeTo(bos);
         Assert.assertArrayEquals(new byte[] { 15, 1, 0, (byte) 255, 0 }, bos.toByteArray());
     }
 
     @Test
     public void canWritePairWithoutBackReference() throws IOException {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
-        byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
         p.addLiteral(new LZ77Compressor.LiteralBlock(b, 1, 4));
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        final ByteArrayOutputStream bos = new ByteArrayOutputStream();
         p.writeTo(bos);
         Assert.assertArrayEquals(new byte[] { 4<<4, 2, 3, 4, 5 }, bos.toByteArray());
     }
 
     @Test
     public void writesCorrectSizeFor15ByteLengthLiteral() throws IOException {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
-        byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
         p.addLiteral(new LZ77Compressor.LiteralBlock(b, 0, 9));
         p.addLiteral(new LZ77Compressor.LiteralBlock(b, 0, 6));
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        final ByteArrayOutputStream bos = new ByteArrayOutputStream();
         p.writeTo(bos);
         Assert.assertArrayEquals(new byte[] { (byte) (15<<4), 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6 },
             bos.toByteArray());
@@ -147,13 +147,13 @@ public class BlockLZ4CompressorOutputStreamTest {
 
     @Test
     public void writesCorrectSizeFor269ByteLengthLiteral() throws IOException {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
-        byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
         for (int i = 0; i < 26; i++) {
             p.addLiteral(new LZ77Compressor.LiteralBlock(b, 0, 10));
         }
         p.addLiteral(new LZ77Compressor.LiteralBlock(b, 0, 9));
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        final ByteArrayOutputStream bos = new ByteArrayOutputStream();
         p.writeTo(bos);
         Assert.assertArrayEquals(new byte[] { (byte) (15<<4), (byte) 254, 1 },
             Arrays.copyOfRange(bos.toByteArray(), 0, 3));
@@ -161,12 +161,12 @@ public class BlockLZ4CompressorOutputStreamTest {
 
     @Test
     public void writesCorrectSizeFor270ByteLengthLiteral() throws IOException {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
-        byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
         for (int i = 0; i < 27; i++) {
             p.addLiteral(new LZ77Compressor.LiteralBlock(b, 0, 10));
         }
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        final ByteArrayOutputStream bos = new ByteArrayOutputStream();
         p.writeTo(bos);
         Assert.assertArrayEquals(new byte[] { (byte) (15<<4), (byte) 255, 0, 1 },
             Arrays.copyOfRange(bos.toByteArray(), 0, 4));
@@ -174,12 +174,12 @@ public class BlockLZ4CompressorOutputStreamTest {
 
     @Test
     public void writesCompletePair() throws IOException {
-        BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
-        byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+        final BlockLZ4CompressorOutputStream.Pair p = new BlockLZ4CompressorOutputStream.Pair();
+        final byte[] b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
         p.addLiteral(new LZ77Compressor.LiteralBlock(b, 1, 4));
         b[2] = 19;
         p.setBackReference(new LZ77Compressor.BackReference(1, 5));
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        final ByteArrayOutputStream bos = new ByteArrayOutputStream();
         p.writeTo(bos);
         Assert.assertArrayEquals(new byte[] { (4<<4) + 1, 2, 3, 4, 5, 1, 0 },
             bos.toByteArray());
@@ -193,8 +193,8 @@ public class BlockLZ4CompressorOutputStreamTest {
             // followed by a back-reference starting with i = 5,
             // though. (4 is the minimum length for a back-reference
             // in LZ4
-            byte[] compressed = compress(i);
-            byte[] expected = prepareExpected(i + 1);
+            final byte[] compressed = compress(i);
+            final byte[] expected = prepareExpected(i + 1);
             expected[0] = (byte) (i<<4);
             Assert.assertArrayEquals("input length is " + i, expected, compressed);
         }
@@ -207,8 +207,8 @@ public class BlockLZ4CompressorOutputStreamTest {
             // would be big enough, but our algorithm insists on a
             // twelve byte literal trailer and the back-reference
             // would fall below the minimal size
-            byte[] compressed = compress(i);
-            byte[] expected = prepareExpected(i < 15 ? i + 1 : i + 2);
+            final byte[] compressed = compress(i);
+            final byte[] expected = prepareExpected(i < 15 ? i + 1 : i + 2);
             if (i < 15) {
                 expected[0] = (byte) (i<<4);
             } else {
@@ -223,8 +223,8 @@ public class BlockLZ4CompressorOutputStreamTest {
             // followed by a back-reference
             // this time even our algorithm is willing to break up the
             // back-reference
-            byte[] compressed = compress(i);
-            byte[] expected = prepareExpected(17);
+            final byte[] compressed = compress(i);
+            final byte[] expected = prepareExpected(17);
             expected[0] = (byte) ((1<<4) | i - 17);
             // two-byte offset
             expected[2] = 1;
@@ -241,8 +241,8 @@ public class BlockLZ4CompressorOutputStreamTest {
             // followed by a back-reference of length 15 followed by a
             // literal of length i
             // we can split the back-reference and merge it with the literal
-            byte[] compressed = compress(16, i);
-            byte[] expected = prepareExpected(17);
+            final byte[] compressed = compress(16, i);
+            final byte[] expected = prepareExpected(17);
             expected[0] = (byte) ((1<<4) | i - 1);
             // two-byte offset
             expected[2] = 1;
@@ -261,8 +261,8 @@ public class BlockLZ4CompressorOutputStreamTest {
             // according to the spec we could completely satisfy the
             // requirements by just rewriting the last Pair, but our
             // algorithm will chip off a few bytes from the first Pair
-            byte[] compressed = compress(16, i);
-            byte[] expected = prepareExpected(17);
+            final byte[] compressed = compress(16, i);
+            final byte[] expected = prepareExpected(17);
             expected[0] = (byte) ((1<<4) | i - 1);
             // two-byte offset
             expected[2] = 1;
@@ -280,8 +280,8 @@ public class BlockLZ4CompressorOutputStreamTest {
             // of length i-1
             // this shouldn't affect the first pair at all as
             // rewriting the second one is sufficient
-            byte[] compressed = compress(16, i);
-            byte[] expected = prepareExpected(i + 5);
+            final byte[] compressed = compress(16, i);
+            final byte[] expected = prepareExpected(i + 5);
             expected[0] = (byte) ((1<<4) | 11);
             // two-byte offset
             expected[2] = 1;
@@ -302,8 +302,8 @@ public class BlockLZ4CompressorOutputStreamTest {
         // in the result the three last pairs are merged into a single
         // literal and one byte is chopped off of the first pair's
         // back-reference
-        byte[] compressed = compress(6, 5, 5, 1);
-        byte[] expected = prepareExpected(17);
+        final byte[] compressed = compress(6, 5, 5, 1);
+        final byte[] expected = prepareExpected(17);
         expected[0] = (byte) (1<<4);
         // two-byte offset
         expected[2] = 1;
@@ -323,14 +323,14 @@ public class BlockLZ4CompressorOutputStreamTest {
     public void rewritingWithFinalBackreferenceAndOffsetBiggerThan1() throws IOException {
         // this caused trouble when expandFromList() fell into the "offsetRemaining is negative" self-copy case as the
         // calculation of copyOffset was wrong
-        byte[] toCompress = prepareExpected(25);
+        final byte[] toCompress = prepareExpected(25);
         for (int i = 0; i < toCompress.length; i += 4) {
             toCompress[i] = 1;
         }
         // LZ77Compressor creates a four byte literal and a back-reference with offset 4 and length 21
         // we'll need to split the back-reference and chop off the last 12 bytes
-        byte[] compressed = compress(toCompress);
-        byte[] expected = prepareExpected(1 + 4 + 2 + 1 + 12);
+        final byte[] compressed = compress(toCompress);
+        final byte[] expected = prepareExpected(1 + 4 + 2 + 1 + 12);
         expected[0] = (byte) ((4<<4) | 5);
         expected[1] = 1;
         expected[5] = 4;
@@ -342,21 +342,21 @@ public class BlockLZ4CompressorOutputStreamTest {
         Assert.assertArrayEquals(expected, compressed);
     }
 
-    private byte[] compress(int length) throws IOException {
+    private byte[] compress(final int length) throws IOException {
         return compress(length, 0);
     }
 
-    private byte[] compress(int lengthBeforeTrailer, int... lengthOfTrailers) throws IOException {
-        byte[] b = prepareExpected(lengthBeforeTrailer);
+    private byte[] compress(final int lengthBeforeTrailer, final int... lengthOfTrailers) throws IOException {
+        final byte[] b = prepareExpected(lengthBeforeTrailer);
         return compress(b, lengthOfTrailers);
     }
 
-    private byte[] compress(byte[] input, int... lengthOfTrailers) throws IOException {
+    private byte[] compress(final byte[] input, final int... lengthOfTrailers) throws IOException {
         try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
              BlockLZ4CompressorOutputStream lo = new BlockLZ4CompressorOutputStream(baos)) {
             lo.write(input);
             for (int i = 0; i < lengthOfTrailers.length; i++) {
-                int lengthOfTrailer = lengthOfTrailers[i];
+                final int lengthOfTrailer = lengthOfTrailers[i];
                 for (int j = 0; j < lengthOfTrailer; j++) {
                     lo.write(i + 1);
                 }
@@ -366,8 +366,8 @@ public class BlockLZ4CompressorOutputStreamTest {
         }
     }
 
-    private byte[] prepareExpected(int length) {
-        byte[] b = new byte[length];
+    private byte[] prepareExpected(final int length) {
+        final byte[] b = new byte[length];
         Arrays.fill(b, (byte) -1);
         return b;
     }
diff --git a/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorRoundtripTest.java b/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorRoundtripTest.java
index da4941d..bc36a7c 100644
--- a/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorRoundtripTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorRoundtripTest.java
@@ -49,13 +49,13 @@ public final class BlockLZ4CompressorRoundtripTest extends AbstractTestCase {
     private final String config;
     private final Parameters params;
 
-    public BlockLZ4CompressorRoundtripTest(String config, Parameters params) {
+    public BlockLZ4CompressorRoundtripTest(final String config, final Parameters params) {
         this.config = config;
         this.params = params;
     }
 
-    private void roundTripTest(String testFile) throws IOException {
-        File input = getFile(testFile);
+    private void roundTripTest(final String testFile) throws IOException {
+        final File input = getFile(testFile);
         long start = System.currentTimeMillis();
         final File outputSz = new File(dir, input.getName() + ".block.lz4");
         try (FileInputStream is = new FileInputStream(input);
@@ -69,8 +69,8 @@ public final class BlockLZ4CompressorRoundtripTest extends AbstractTestCase {
         start = System.currentTimeMillis();
         try (FileInputStream is = new FileInputStream(input);
              BlockLZ4CompressorInputStream sis = new BlockLZ4CompressorInputStream(new FileInputStream(outputSz))) {
-            byte[] expected = IOUtils.toByteArray(is);
-            byte[] actual = IOUtils.toByteArray(sis);
+            final byte[] expected = IOUtils.toByteArray(is);
+            final byte[] actual = IOUtils.toByteArray(sis);
             Assert.assertArrayEquals(expected, actual);
         }
         System.err.println(outputSz.getName() + " read after " + (System.currentTimeMillis() - start) + "ms");
diff --git a/src/test/java/org/apache/commons/compress/compressors/lz4/FactoryTest.java b/src/test/java/org/apache/commons/compress/compressors/lz4/FactoryTest.java
index 3db6249..77b629c 100644
--- a/src/test/java/org/apache/commons/compress/compressors/lz4/FactoryTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/lz4/FactoryTest.java
@@ -42,8 +42,8 @@ public class FactoryTest extends AbstractTestCase {
         roundtripViaFactory(CompressorStreamFactory.getLZ4Block());
     }
 
-    private void roundtripViaFactory(String format) throws Exception {
-        File input = getFile("bla.tar");
+    private void roundtripViaFactory(final String format) throws Exception {
+        final File input = getFile("bla.tar");
         long start = System.currentTimeMillis();
         final File outputSz = new File(dir, input.getName() + "." + format + ".lz4");
         try (FileInputStream is = new FileInputStream(input);
@@ -57,8 +57,8 @@ public class FactoryTest extends AbstractTestCase {
         try (FileInputStream is = new FileInputStream(input);
              InputStream sis = new CompressorStreamFactory()
                  .createCompressorInputStream(format, new FileInputStream(outputSz))) {
-            byte[] expected = IOUtils.toByteArray(is);
-            byte[] actual = IOUtils.toByteArray(sis);
+            final byte[] expected = IOUtils.toByteArray(is);
+            final byte[] actual = IOUtils.toByteArray(sis);
             Assert.assertArrayEquals(expected, actual);
         }
         System.err.println(outputSz.getName() + " read after " + (System.currentTimeMillis() - start) + "ms");
diff --git a/src/test/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStreamTest.java b/src/test/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStreamTest.java
index 126be75..2b91351 100644
--- a/src/test/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStreamTest.java
@@ -56,8 +56,8 @@ public final class FramedLZ4CompressorInputStreamTest
     public void readBlaLz4() throws IOException {
         try (InputStream a = new FramedLZ4CompressorInputStream(new FileInputStream(getFile("bla.tar.lz4")));
             FileInputStream e = new FileInputStream(getFile("bla.tar"))) {
-            byte[] expected = IOUtils.toByteArray(e);
-            byte[] actual = IOUtils.toByteArray(a);
+            final byte[] expected = IOUtils.toByteArray(e);
+            final byte[] actual = IOUtils.toByteArray(a);
             assertArrayEquals(expected, actual);
         }
     }
@@ -68,8 +68,8 @@ public final class FramedLZ4CompressorInputStreamTest
                  .createCompressorInputStream(CompressorStreamFactory.getLZ4Framed(),
                                               new FileInputStream(getFile("bla.tar.lz4")));
             FileInputStream e = new FileInputStream(getFile("bla.tar"))) {
-            byte[] expected = IOUtils.toByteArray(e);
-            byte[] actual = IOUtils.toByteArray(a);
+            final byte[] expected = IOUtils.toByteArray(e);
+            final byte[] actual = IOUtils.toByteArray(a);
             assertArrayEquals(expected, actual);
         }
     }
@@ -79,8 +79,8 @@ public final class FramedLZ4CompressorInputStreamTest
         try (InputStream a = new CompressorStreamFactory()
                  .createCompressorInputStream(new BufferedInputStream(new FileInputStream(getFile("bla.tar.lz4"))));
             FileInputStream e = new FileInputStream(getFile("bla.tar"))) {
-            byte[] expected = IOUtils.toByteArray(e);
-            byte[] actual = IOUtils.toByteArray(a);
+            final byte[] expected = IOUtils.toByteArray(e);
+            final byte[] actual = IOUtils.toByteArray(a);
             assertArrayEquals(expected, actual);
         }
     }
@@ -89,8 +89,8 @@ public final class FramedLZ4CompressorInputStreamTest
     public void readBlaLz4WithDecompressConcatenated() throws IOException {
         try (InputStream a = new FramedLZ4CompressorInputStream(new FileInputStream(getFile("bla.tar.lz4")), true);
             FileInputStream e = new FileInputStream(getFile("bla.tar"))) {
-            byte[] expected = IOUtils.toByteArray(e);
-            byte[] actual = IOUtils.toByteArray(a);
+            final byte[] expected = IOUtils.toByteArray(e);
+            final byte[] actual = IOUtils.toByteArray(a);
             assertArrayEquals(expected, actual);
         }
     }
@@ -99,7 +99,7 @@ public final class FramedLZ4CompressorInputStreamTest
     public void readDoubledBlaLz4WithDecompressConcatenatedTrue() throws Exception {
         readDoubledBlaLz4(new StreamWrapper() {
                 @Override
-                public InputStream wrap(InputStream in) throws Exception {
+                public InputStream wrap(final InputStream in) throws Exception {
                     return new FramedLZ4CompressorInputStream(in, true);
                 }
             }, true);
@@ -109,7 +109,7 @@ public final class FramedLZ4CompressorInputStreamTest
     public void readDoubledBlaLz4WithDecompressConcatenatedFalse() throws Exception {
         readDoubledBlaLz4(new StreamWrapper() {
                 @Override
-                public InputStream wrap(InputStream in) throws Exception {
+                public InputStream wrap(final InputStream in) throws Exception {
                     return new FramedLZ4CompressorInputStream(in, false);
                 }
             }, false);
@@ -119,7 +119,7 @@ public final class FramedLZ4CompressorInputStreamTest
     public void readDoubledBlaLz4WithoutExplicitDecompressConcatenated() throws Exception {
         readDoubledBlaLz4(new StreamWrapper() {
                 @Override
-                public InputStream wrap(InputStream in) throws Exception {
+                public InputStream wrap(final InputStream in) throws Exception {
                     return new FramedLZ4CompressorInputStream(in);
                 }
             }, false);
@@ -132,8 +132,8 @@ public final class FramedLZ4CompressorInputStreamTest
                                               new FileInputStream(getFile("bla.tar.lz4")),
                                               true);
             FileInputStream e = new FileInputStream(getFile("bla.tar"))) {
-            byte[] expected = IOUtils.toByteArray(e);
-            byte[] actual = IOUtils.toByteArray(a);
+            final byte[] expected = IOUtils.toByteArray(e);
+            final byte[] actual = IOUtils.toByteArray(a);
             assertArrayEquals(expected, actual);
         }
     }
@@ -142,7 +142,7 @@ public final class FramedLZ4CompressorInputStreamTest
     public void readDoubledBlaLz4ViaFactoryWithDecompressConcatenatedTrue() throws Exception {
         readDoubledBlaLz4(new StreamWrapper() {
                 @Override
-                public InputStream wrap(InputStream in) throws Exception {
+                public InputStream wrap(final InputStream in) throws Exception {
                     return new CompressorStreamFactory()
                         .createCompressorInputStream(CompressorStreamFactory.getLZ4Framed(), in, true);
                 }
@@ -153,7 +153,7 @@ public final class FramedLZ4CompressorInputStreamTest
     public void readDoubledBlaLz4ViaFactoryWithDecompressConcatenatedFalse() throws Exception {
         readDoubledBlaLz4(new StreamWrapper() {
                 @Override
-                public InputStream wrap(InputStream in) throws Exception {
+                public InputStream wrap(final InputStream in) throws Exception {
                     return new CompressorStreamFactory()
                         .createCompressorInputStream(CompressorStreamFactory.getLZ4Framed(), in, false);
                 }
@@ -164,7 +164,7 @@ public final class FramedLZ4CompressorInputStreamTest
     public void readDoubledBlaLz4ViaFactoryWithoutExplicitDecompressConcatenated() throws Exception {
         readDoubledBlaLz4(new StreamWrapper() {
                 @Override
-                public InputStream wrap(InputStream in) throws Exception {
+                public InputStream wrap(final InputStream in) throws Exception {
                     return new CompressorStreamFactory()
                         .createCompressorInputStream(CompressorStreamFactory.getLZ4Framed(), in);
                 }
@@ -175,8 +175,8 @@ public final class FramedLZ4CompressorInputStreamTest
     public void readBlaDumpLz4() throws IOException {
         try (InputStream a = new FramedLZ4CompressorInputStream(new FileInputStream(getFile("bla.dump.lz4")));
             FileInputStream e = new FileInputStream(getFile("bla.dump"))) {
-            byte[] expected = IOUtils.toByteArray(e);
-            byte[] actual = IOUtils.toByteArray(a);
+            final byte[] expected = IOUtils.toByteArray(e);
+            final byte[] actual = IOUtils.toByteArray(a);
             assertArrayEquals(expected, actual);
         }
     }
@@ -190,21 +190,21 @@ public final class FramedLZ4CompressorInputStreamTest
 
     @Test
     public void rejectsFileWithoutFrameDescriptor() throws IOException {
-        byte[] input = new byte[] {
+        final byte[] input = new byte[] {
             4, 0x22, 0x4d, 0x18 // signature
         };
         try {
             try (InputStream a = new FramedLZ4CompressorInputStream(new ByteArrayInputStream(input))) {
                 fail("expected exception");
             }
-        } catch (IOException ex) {
+        } catch (final IOException ex) {
             assertThat(ex.getMessage(), containsString("frame flags"));
         }
     }
 
     @Test
     public void rejectsFileWithoutBlockSizeByte() throws IOException {
-        byte[] input = new byte[] {
+        final byte[] input = new byte[] {
             4, 0x22, 0x4d, 0x18, // signature
             0x64, // flag - Version 01, block independent, no block checksum, no content size, with content checksum
         };
@@ -212,14 +212,14 @@ public final class FramedLZ4CompressorInputStreamTest
             try (InputStream a = new FramedLZ4CompressorInputStream(new ByteArrayInputStream(input))) {
                 fail("expected exception");
             }
-        } catch (IOException ex) {
+        } catch (final IOException ex) {
             assertThat(ex.getMessage(), containsString("BD byte"));
         }
     }
 
     @Test
     public void rejectsFileWithWrongVersion() throws IOException {
-        byte[] input = new byte[] {
+        final byte[] input = new byte[] {
             4, 0x22, 0x4d, 0x18, // signature
             0x24, // flag - Version 00, block independent, no block checksum, no content size, with content checksum
         };
@@ -227,14 +227,14 @@ public final class FramedLZ4CompressorInputStreamTest
             try (InputStream a = new FramedLZ4CompressorInputStream(new ByteArrayInputStream(input))) {
                 fail("expected exception");
             }
-        } catch (IOException ex) {
+        } catch (final IOException ex) {
             assertThat(ex.getMessage(), containsString("version"));
         }
     }
 
     @Test
     public void rejectsFileWithInsufficientContentSize() throws IOException {
-        byte[] input = new byte[] {
+        final byte[] input = new byte[] {
             4, 0x22, 0x4d, 0x18, // signature
             0x6C, // flag - Version 01, block independent, no block checksum, with content size, with content checksum
             0x70, // block size 4MB
@@ -243,14 +243,14 @@ public final class FramedLZ4CompressorInputStreamTest
             try (InputStream a = new FramedLZ4CompressorInputStream(new ByteArrayInputStream(input))) {
                 fail("expected exception");
             }
-        } catch (IOException ex) {
+        } catch (final IOException ex) {
             assertThat(ex.getMessage(), containsString("content size"));
         }
     }
 
     @Test
     public void rejectsFileWithoutHeaderChecksum() throws IOException {
-        byte[] input = new byte[] {
+        final byte[] input = new byte[] {
             4, 0x22, 0x4d, 0x18, // signature
             0x64, // flag - Version 01, block independent, no block checksum, no content size, with content checksum
             0x70, // block size 4MB
@@ -259,14 +259,14 @@ public final class FramedLZ4CompressorInputStreamTest
             try (InputStream a = new FramedLZ4CompressorInputStream(new ByteArrayInputStream(input))) {
                 fail("expected exception");
             }
-        } catch (IOException ex) {
+        } catch (final IOException ex) {
             assertThat(ex.getMessage(), containsString("header checksum"));
         }
     }
 
     @Test
     public void rejectsFileWithBadHeaderChecksum() throws IOException {
-        byte[] input = new byte[] {
+        final byte[] input = new byte[] {
             4, 0x22, 0x4d, 0x18, // signature
             0x64, // flag - Version 01, block independent, no block checksum, no content size, with content checksum
             0x70, // block size 4MB
@@ -276,14 +276,14 @@ public final class FramedLZ4CompressorInputStreamTest
             try (InputStream a = new FramedLZ4CompressorInputStream(new ByteArrayInputStream(input))) {
                 fail("expected exception");
             }
-        } catch (IOException ex) {
+        } catch (final IOException ex) {
             assertThat(ex.getMessage(), containsString("header checksum mismatch"));
         }
     }
 
     @Test
     public void readsUncompressedBlocks() throws IOException {
-        byte[] input = new byte[] {
+        final byte[] input = new byte[] {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -293,7 +293,7 @@ public final class FramedLZ4CompressorInputStreamTest
             0, 0, 0, 0, // empty block marker
         };
         try (InputStream a = new FramedLZ4CompressorInputStream(new ByteArrayInputStream(input))) {
-            byte[] actual = IOUtils.toByteArray(a);
+            final byte[] actual = IOUtils.toByteArray(a);
             assertArrayEquals(new byte[] {
                     'H', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd', '!'
                 }, actual);
@@ -302,7 +302,7 @@ public final class FramedLZ4CompressorInputStreamTest
 
     @Test
     public void readsUncompressedBlocksUsingSingleByteRead() throws IOException {
-        byte[] input = new byte[] {
+        final byte[] input = new byte[] {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -312,14 +312,14 @@ public final class FramedLZ4CompressorInputStreamTest
             0, 0, 0, 0, // empty block marker
         };
         try (InputStream a = new FramedLZ4CompressorInputStream(new ByteArrayInputStream(input))) {
-            int h = a.read();
+            final int h = a.read();
             assertEquals('H', h);
         }
     }
 
     @Test
     public void rejectsBlocksWithoutChecksum() throws IOException {
-        byte[] input = new byte[] {
+        final byte[] input = new byte[] {
             4, 0x22, 0x4d, 0x18, // signature
             0x70, // flag - Version 01, block independent, with block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -332,14 +332,14 @@ public final class FramedLZ4CompressorInputStreamTest
                 IOUtils.toByteArray(a);
                 fail("expected exception");
             }
-        } catch (IOException ex) {
+        } catch (final IOException ex) {
             assertThat(ex.getMessage(), containsString("block checksum"));
         }
     }
 
     @Test
     public void rejectsStreamsWithoutContentChecksum() throws IOException {
-        byte[] input = new byte[] {
+        final byte[] input = new byte[] {
             4, 0x22, 0x4d, 0x18, // signature
             0x64, // flag - Version 01, block independent, no block checksum, no content size, with content checksum
             0x70, // block size 4MB
@@ -353,14 +353,14 @@ public final class FramedLZ4CompressorInputStreamTest
                 IOUtils.toByteArray(a);
                 fail("expected exception");
             }
-        } catch (IOException ex) {
+        } catch (final IOException ex) {
             assertThat(ex.getMessage(), containsString("content checksum"));
         }
     }
 
     @Test
     public void rejectsStreamsWithBadContentChecksum() throws IOException {
-        byte[] input = new byte[] {
+        final byte[] input = new byte[] {
             4, 0x22, 0x4d, 0x18, // signature
             0x64, // flag - Version 01, block independent, no block checksum, no content size, with content checksum
             0x70, // block size 4MB
@@ -375,14 +375,14 @@ public final class FramedLZ4CompressorInputStreamTest
                 IOUtils.toByteArray(a);
                 fail("expected exception");
             }
-        } catch (IOException ex) {
+        } catch (final IOException ex) {
             assertThat(ex.getMessage(), containsString("content checksum mismatch"));
         }
     }
 
     @Test
     public void skipsOverSkippableFrames() throws IOException {
-        byte[] input = new byte[] {
+        final byte[] input = new byte[] {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -402,7 +402,7 @@ public final class FramedLZ4CompressorInputStreamTest
             0, 0, 0, 0, // empty block marker
         };
         try (InputStream a = new FramedLZ4CompressorInputStream(new ByteArrayInputStream(input), true)) {
-            byte[] actual = IOUtils.toByteArray(a);
+            final byte[] actual = IOUtils.toByteArray(a);
             assertArrayEquals(new byte[] {
                     'H', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd', '!', '!'
                 }, actual);
@@ -411,7 +411,7 @@ public final class FramedLZ4CompressorInputStreamTest
 
     @Test
     public void skipsOverTrailingSkippableFrames() throws IOException {
-        byte[] input = new byte[] {
+        final byte[] input = new byte[] {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
             0x70, // block size 4MB
@@ -424,7 +424,7 @@ public final class FramedLZ4CompressorInputStreamTest
             1, 2, // content of skippable frame
         };
         try (InputStream a = new FramedLZ4CompressorInputStream(new ByteArrayInputStream(input), true)) {
-            byte[] actual = IOUtils.toByteArray(a);
+            final byte[] actual = IOUtils.toByteArray(a);
             assertArrayEquals(new byte[] {
                     'H', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd', '!'
                 }, actual);
@@ -433,7 +433,7 @@ public final class FramedLZ4CompressorInputStreamTest
 
     @Test
     public void rejectsSkippableFrameFollowedByJunk() throws IOException {
-        byte[] input = new byte[] {
+        final byte[] input = new byte[] {
             4, 0x22, 0x4d, 0x18, // signature
             0x60, // flag - Version 01, block independent, no block checksum, no content size, no content checksum
... 2219 lines suppressed ...


[commons-compress] 03/03: - Remove unused imports. - Use Java 7 diamonds. - Better boolean test. - Remove redundant modifiers. - Remove redundant ;

Posted by gg...@apache.org.
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 1c13587ba8e2bf5188c92b07913fdd2b2e17197b
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Aug 8 18:19:15 2020 -0400

    - Remove unused imports.
    - Use Java 7 diamonds.
    - Better boolean test.
    - Remove redundant modifiers.
    - Remove redundant ;
---
 .../commons/compress/archivers/examples/CloseableConsumer.java    | 4 ++--
 .../apache/commons/compress/archivers/zip/StreamCompressor.java   | 8 ++++----
 .../commons/compress/archivers/zip/ZipArchiveOutputStream.java    | 7 ++-----
 .../commons/compress/compressors/lz77support/Parameters.java      | 2 +-
 .../commons/compress/compressors/snappy/PureJavaCrc32C.java       | 2 +-
 src/main/java/org/apache/commons/compress/utils/ByteUtils.java    | 2 +-
 src/main/java/org/apache/commons/compress/utils/IOUtils.java      | 1 -
 src/test/java/org/apache/commons/compress/AbstractTestCase.java   | 2 +-
 .../org/apache/commons/compress/archivers/SevenZTestCase.java     | 2 +-
 .../org/apache/commons/compress/archivers/zip/Zip64SupportIT.java | 2 +-
 .../org/apache/commons/compress/archivers/zip/ZipFileTest.java    | 4 ++--
 .../apache/commons/compress/utils/ServiceLoaderIteratorTest.java  | 6 +++---
 12 files changed, 19 insertions(+), 23 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumer.java b/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumer.java
index 39180fb..25ce537 100644
--- a/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumer.java
+++ b/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumer.java
@@ -34,7 +34,7 @@ public interface CloseableConsumer {
     /**
      * Closes the passed in Closeable immediately.
      */
-    public static CloseableConsumer CLOSING_CONSUMER = new CloseableConsumer() {
+    CloseableConsumer CLOSING_CONSUMER = new CloseableConsumer() {
         @Override
         public void accept(final Closeable c) throws IOException {
             c.close();
@@ -44,7 +44,7 @@ public interface CloseableConsumer {
     /**
      * Completely ignores the passed in Closeable.
      */
-    public static CloseableConsumer NULL_CONSUMER = new CloseableConsumer() {
+    CloseableConsumer NULL_CONSUMER = new CloseableConsumer() {
         @Override
         public void accept(final Closeable c) { }
     };
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java b/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java
index 1e8d68b..c9a9169 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java
@@ -286,7 +286,7 @@ public abstract class StreamCompressor implements Closeable {
         }
 
         @Override
-        protected final void writeOut(final byte[] data, final int offset, final int length)
+        protected void writeOut(final byte[] data, final int offset, final int length)
                 throws IOException {
             bs.writeOut(data, offset, length);
         }
@@ -301,7 +301,7 @@ public abstract class StreamCompressor implements Closeable {
         }
 
         @Override
-        protected final void writeOut(final byte[] data, final int offset, final int length)
+        protected void writeOut(final byte[] data, final int offset, final int length)
                 throws IOException {
             os.write(data, offset, length);
         }
@@ -316,7 +316,7 @@ public abstract class StreamCompressor implements Closeable {
         }
 
         @Override
-        protected final void writeOut(final byte[] data, final int offset, final int length)
+        protected void writeOut(final byte[] data, final int offset, final int length)
                 throws IOException {
             raf.write(data, offset, length);
         }
@@ -332,7 +332,7 @@ public abstract class StreamCompressor implements Closeable {
         }
 
         @Override
-        protected final void writeOut(final byte[] data, final int offset, final int length)
+        protected void writeOut(final byte[] data, final int offset, final int length)
                 throws IOException {
             channel.write(ByteBuffer.wrap(data, offset, length));
         }
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
index eef673b..e145e6d 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
@@ -31,7 +31,6 @@ import static org.apache.commons.compress.archivers.zip.ZipShort.putShort;
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -1196,12 +1195,10 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream {
         ZipUtil.toDosTime(calendarInstance, ze.getTime(), buf, LFH_TIME_OFFSET);
 
         // CRC
-        if (phased){
+        if (phased || !(zipMethod == DEFLATED || channel != null)){
             putLong(ze.getCrc(), buf, LFH_CRC_OFFSET);
-        } else if (zipMethod == DEFLATED || channel != null) {
-            System.arraycopy(LZERO, 0, buf, LFH_CRC_OFFSET, WORD);
         } else {
-            putLong(ze.getCrc(), buf, LFH_CRC_OFFSET);
+            System.arraycopy(LZERO, 0, buf, LFH_CRC_OFFSET, WORD);
         }
 
         // compressed length
diff --git a/src/main/java/org/apache/commons/compress/compressors/lz77support/Parameters.java b/src/main/java/org/apache/commons/compress/compressors/lz77support/Parameters.java
index 0c28f42..cd468a1 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lz77support/Parameters.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lz77support/Parameters.java
@@ -343,7 +343,7 @@ public final class Parameters {
         return lazyThreshold;
     }
 
-    private static final boolean isPowerOfTwo(final int x) {
+    private static boolean isPowerOfTwo(final int x) {
         // pre-condition: x > 0
         return (x & (x - 1)) == 0;
     }
diff --git a/src/main/java/org/apache/commons/compress/compressors/snappy/PureJavaCrc32C.java b/src/main/java/org/apache/commons/compress/compressors/snappy/PureJavaCrc32C.java
index bdde8a0..01cfaee 100644
--- a/src/main/java/org/apache/commons/compress/compressors/snappy/PureJavaCrc32C.java
+++ b/src/main/java/org/apache/commons/compress/compressors/snappy/PureJavaCrc32C.java
@@ -96,7 +96,7 @@ final class PureJavaCrc32C implements Checksum {
   }
 
   @Override
-  final public void update(final int b) {
+  public void update(final int b) {
     crc = (crc >>> 8) ^ T[T8_0_START + ((crc ^ b) & 0xff)];
   }
 
diff --git a/src/main/java/org/apache/commons/compress/utils/ByteUtils.java b/src/main/java/org/apache/commons/compress/utils/ByteUtils.java
index 25dc150..01b5021 100644
--- a/src/main/java/org/apache/commons/compress/utils/ByteUtils.java
+++ b/src/main/java/org/apache/commons/compress/utils/ByteUtils.java
@@ -253,7 +253,7 @@ public final class ByteUtils {
         }
     }
 
-    private static final void checkReadLength(final int length) {
+    private static void checkReadLength(final int length) {
         if (length > 8) {
             throw new IllegalArgumentException("Can't read more than eight bytes into a long value");
         }
diff --git a/src/main/java/org/apache/commons/compress/utils/IOUtils.java b/src/main/java/org/apache/commons/compress/utils/IOUtils.java
index 54636c1..47bba81 100644
--- a/src/main/java/org/apache/commons/compress/utils/IOUtils.java
+++ b/src/main/java/org/apache/commons/compress/utils/IOUtils.java
@@ -23,7 +23,6 @@ import java.io.Closeable;
 import java.io.EOFException;
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
diff --git a/src/test/java/org/apache/commons/compress/AbstractTestCase.java b/src/test/java/org/apache/commons/compress/AbstractTestCase.java
index 08d1985..4bf61db 100644
--- a/src/test/java/org/apache/commons/compress/AbstractTestCase.java
+++ b/src/test/java/org/apache/commons/compress/AbstractTestCase.java
@@ -404,7 +404,7 @@ public abstract class AbstractTestCase {
         }
     }
 
-    protected static interface StreamWrapper<I extends InputStream> {
+    protected interface StreamWrapper<I extends InputStream> {
         I wrap(InputStream in) throws Exception;
     }
 }
diff --git a/src/test/java/org/apache/commons/compress/archivers/SevenZTestCase.java b/src/test/java/org/apache/commons/compress/archivers/SevenZTestCase.java
index d593379..6f72f45 100644
--- a/src/test/java/org/apache/commons/compress/archivers/SevenZTestCase.java
+++ b/src/test/java/org/apache/commons/compress/archivers/SevenZTestCase.java
@@ -225,7 +225,7 @@ public class SevenZTestCase extends AbstractTestCase {
         final byte[] buf = new byte[1024];
         int x = 0;
         while (0 <= (x = archive.read(buf))) {
-            ;
+            
         }
     }
 
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/Zip64SupportIT.java b/src/test/java/org/apache/commons/compress/archivers/zip/Zip64SupportIT.java
index ee3d5a4..467f3ea 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/Zip64SupportIT.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/Zip64SupportIT.java
@@ -2420,7 +2420,7 @@ public class Zip64SupportIT {
                 true, 65536L);
     }
 
-    static interface ZipOutputTest {
+    interface ZipOutputTest {
         void test(File f, ZipArchiveOutputStream zos) throws IOException;
     }
 
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
index d29c998..c2b6485 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
@@ -366,7 +366,7 @@ public class ZipFileTest {
         }
         zf = new ZipFile(new SeekableInMemoryByteChannel(data), ZipEncodingHelper.UTF8);
 
-        final Map<String, byte[]> content = new HashMap<String, byte[]>();
+        final Map<String, byte[]> content = new HashMap<>();
         for (final ZipArchiveEntry entry: Collections.list(zf.getEntries())) {
             content.put(entry.getName(), IOUtils.toByteArray(zf.getInputStream(entry)));
         }
@@ -396,7 +396,7 @@ public class ZipFileTest {
         final File archive = getFile("mixed.zip");
         zf = new ZipFile(archive);
 
-        final Map<String, byte[]> content = new HashMap<String, byte[]>();
+        final Map<String, byte[]> content = new HashMap<>();
         for (final ZipArchiveEntry entry: Collections.list(zf.getEntries())) {
             content.put(entry.getName(), IOUtils.toByteArray(zf.getInputStream(entry)));
         }
diff --git a/src/test/java/org/apache/commons/compress/utils/ServiceLoaderIteratorTest.java b/src/test/java/org/apache/commons/compress/utils/ServiceLoaderIteratorTest.java
index e985f89..707f155 100644
--- a/src/test/java/org/apache/commons/compress/utils/ServiceLoaderIteratorTest.java
+++ b/src/test/java/org/apache/commons/compress/utils/ServiceLoaderIteratorTest.java
@@ -38,7 +38,7 @@ public class ServiceLoaderIteratorTest {
     public void testNextThrowsNoSuchElementException() {
 
         final Class<String> clasz = String.class;
-        final ServiceLoaderIterator<String> serviceLoaderIterator = new ServiceLoaderIterator<String>(clasz);
+        final ServiceLoaderIterator<String> serviceLoaderIterator = new ServiceLoaderIterator<>(clasz);
 
         serviceLoaderIterator.next();
 
@@ -49,7 +49,7 @@ public class ServiceLoaderIteratorTest {
     public void testHasNextReturnsFalse() {
 
         final Class<Object> clasz = Object.class;
-        final ServiceLoaderIterator<Object> serviceLoaderIterator = new ServiceLoaderIterator<Object>(clasz);
+        final ServiceLoaderIterator<Object> serviceLoaderIterator = new ServiceLoaderIterator<>(clasz);
         final boolean result = serviceLoaderIterator.hasNext();
 
         assertFalse(result);
@@ -61,7 +61,7 @@ public class ServiceLoaderIteratorTest {
     public void testRemoveThrowsUnsupportedOperationException() {
 
         final Class<Integer> clasz = Integer.class;
-        final ServiceLoaderIterator<Integer> serviceLoaderIterator = new ServiceLoaderIterator<Integer>(clasz);
+        final ServiceLoaderIterator<Integer> serviceLoaderIterator = new ServiceLoaderIterator<>(clasz);
 
         serviceLoaderIterator.remove();