commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject [44/46] commons-compress git commit: Add final modifier to local variables.
Date Sun, 10 Apr 2016 04:19:00 GMT
Add final modifier to local variables.

Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/3f2c760a
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/3f2c760a
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/3f2c760a

Branch: refs/heads/COMPRESS-207
Commit: 3f2c760a4eb82d880e62a03cb9450d9dcf2793f7
Parents: bf85a64
Author: ggregory <ggregory@apache.org>
Authored: Sat Apr 9 10:10:28 2016 -0700
Committer: ggregory <ggregory@apache.org>
Committed: Sat Apr 9 10:10:28 2016 -0700

----------------------------------------------------------------------
 .../compress/archivers/ArchiveInputStream.java  |   2 +-
 .../archivers/ArchiveStreamFactory.java         |   6 +-
 .../commons/compress/archivers/Lister.java      |   4 +-
 .../compress/archivers/ar/ArArchiveEntry.java   |   2 +-
 .../archivers/ar/ArArchiveInputStream.java      |  18 +-
 .../archivers/ar/ArArchiveOutputStream.java     |   4 +-
 .../compress/archivers/arj/ArjArchiveEntry.java |   2 +-
 .../archivers/arj/ArjArchiveInputStream.java    |   6 +-
 .../compress/archivers/arj/LocalFileHeader.java |   2 +-
 .../archivers/cpio/CpioArchiveEntry.java        |   8 +-
 .../archivers/cpio/CpioArchiveInputStream.java  |  34 +--
 .../archivers/cpio/CpioArchiveOutputStream.java |  18 +-
 .../compress/archivers/cpio/CpioUtil.java       |   4 +-
 .../archivers/dump/DumpArchiveConstants.java    |   4 +-
 .../archivers/dump/DumpArchiveEntry.java        |  14 +-
 .../archivers/dump/DumpArchiveInputStream.java  |  38 +--
 .../archivers/dump/DumpArchiveSummary.java      |   2 +-
 .../archivers/dump/DumpArchiveUtil.java         |   6 +-
 .../archivers/dump/TapeInputStream.java         |  20 +-
 .../compress/archivers/jar/JarArchiveEntry.java |   2 +-
 .../archivers/jar/JarArchiveInputStream.java    |   2 +-
 .../archivers/sevenz/AES256SHA256Decoder.java   |   4 +-
 .../commons/compress/archivers/sevenz/CLI.java  |  20 +-
 .../compress/archivers/sevenz/CoderBase.java    |   2 +-
 .../compress/archivers/sevenz/Coders.java       |  14 +-
 .../compress/archivers/sevenz/DeltaDecoder.java |   4 +-
 .../compress/archivers/sevenz/Folder.java       |   4 +-
 .../compress/archivers/sevenz/LZMA2Decoder.java |  16 +-
 .../archivers/sevenz/SevenZArchiveEntry.java    |   4 +-
 .../compress/archivers/sevenz/SevenZFile.java   |  18 +-
 .../compress/archivers/sevenz/SevenZMethod.java |   4 +-
 .../archivers/sevenz/SevenZOutputFile.java      |  36 +--
 .../compress/archivers/tar/TarArchiveEntry.java |  36 +--
 .../archivers/tar/TarArchiveInputStream.java    |  52 ++--
 .../archivers/tar/TarArchiveOutputStream.java   |  34 +--
 .../compress/archivers/tar/TarUtils.java        |  26 +-
 .../zip/AbstractUnicodeExtraField.java          |   6 +-
 .../compress/archivers/zip/AsiExtraField.java   |  22 +-
 .../compress/archivers/zip/BinaryTree.java      |  30 +-
 .../compress/archivers/zip/CircularBuffer.java  |   6 +-
 .../archivers/zip/ExplodingInputStream.java     |  10 +-
 .../compress/archivers/zip/ExtraFieldUtils.java |  48 ++--
 .../archivers/zip/GeneralPurposeBit.java        |   8 +-
 .../compress/archivers/zip/NioZipEncoding.java  |   8 +-
 .../archivers/zip/PKWareExtraHeader.java        |  12 +-
 .../zip/ParallelScatterZipCreator.java          |  14 +-
 .../archivers/zip/ScatterZipOutputStream.java   |  10 +-
 .../archivers/zip/Simple8BitZipEncoding.java    |  22 +-
 .../archivers/zip/StreamCompressor.java         |   4 +-
 .../archivers/zip/UnrecognizedExtraField.java   |   4 +-
 .../archivers/zip/UnshrinkingInputStream.java   |   2 +-
 .../compress/archivers/zip/X000A_NTFS.java      |  14 +-
 .../zip/X0017_StrongEncryptionHeader.java       |  10 +-
 .../archivers/zip/X5455_ExtendedTimestamp.java  |  16 +-
 .../compress/archivers/zip/X7875_NewUnix.java   |  22 +-
 .../zip/Zip64ExtendedInformationExtraField.java |   6 +-
 .../compress/archivers/zip/ZipArchiveEntry.java |  46 +--
 .../archivers/zip/ZipArchiveInputStream.java    |  64 ++---
 .../archivers/zip/ZipArchiveOutputStream.java   |  84 +++---
 .../archivers/zip/ZipEightByteInteger.java      |   6 +-
 .../archivers/zip/ZipEncodingHelper.java        |  22 +-
 .../commons/compress/archivers/zip/ZipFile.java |  90 +++---
 .../commons/compress/archivers/zip/ZipLong.java |   4 +-
 .../compress/archivers/zip/ZipMethod.java       |   4 +-
 .../compress/archivers/zip/ZipShort.java        |   6 +-
 .../commons/compress/archivers/zip/ZipUtil.java |  34 +--
 .../commons/compress/changes/ChangeSet.java     |  14 +-
 .../compress/changes/ChangeSetPerformer.java    |  24 +-
 .../compressors/CompressorStreamFactory.java    |   8 +-
 .../compress/compressors/FileNameUtil.java      |  12 +-
 .../bzip2/BZip2CompressorInputStream.java       |  20 +-
 .../bzip2/BZip2CompressorOutputStream.java      |  34 +--
 .../compress/compressors/bzip2/BZip2Utils.java  |   2 +-
 .../compress/compressors/bzip2/BlockSort.java   |  19 +-
 .../commons/compress/compressors/bzip2/CRC.java |   2 +-
 .../deflate/DeflateCompressorInputStream.java   |   4 +-
 .../gzip/GzipCompressorInputStream.java         |  22 +-
 .../gzip/GzipCompressorOutputStream.java        |  12 +-
 .../compress/compressors/gzip/GzipUtils.java    |   2 +-
 .../lzma/LZMACompressorInputStream.java         |   4 +-
 .../compress/compressors/lzma/LZMAUtils.java    |   6 +-
 .../compressors/lzw/LZWInputStream.java         |   8 +-
 .../pack200/Pack200CompressorInputStream.java   |   8 +-
 .../pack200/Pack200CompressorOutputStream.java  |   2 +-
 .../compressors/pack200/Pack200Utils.java       |   6 +-
 .../FramedSnappyCompressorInputStream.java      |  22 +-
 .../compressors/snappy/PureJavaCrc32C.java      |   2 +-
 .../snappy/SnappyCompressorInputStream.java     |  12 +-
 .../compressors/xz/XZCompressorInputStream.java |   4 +-
 .../compress/compressors/xz/XZUtils.java        |   6 +-
 .../compressors/z/ZCompressorInputStream.java   |  10 +-
 .../commons/compress/utils/ArchiveUtils.java    |  14 +-
 .../utils/ChecksumVerifyingInputStream.java     |   4 +-
 .../compress/utils/CountingInputStream.java     |   4 +-
 .../apache/commons/compress/utils/IOUtils.java  |   8 +-
 .../commons/compress/AbstractTestCase.java      |  32 +--
 .../commons/compress/ArchiveReadTest.java       |  13 +-
 .../commons/compress/ArchiveUtilsTest.java      |  10 +-
 .../commons/compress/ChainingTestCase.java      |   4 +-
 .../compress/DetectArchiverTestCase.java        |   6 +-
 .../apache/commons/compress/IOMethodsTest.java  |  48 ++--
 .../commons/compress/archivers/ArTestCase.java  |  34 +--
 .../archivers/ArchiveOutputStreamTest.java      |  30 +-
 .../archivers/ArchiveStreamFactoryTest.java     |  60 ++--
 .../compress/archivers/CpioTestCase.java        |  36 +--
 .../compress/archivers/DumpTestCase.java        |   4 +-
 .../archivers/ExceptionMessageTest.java         |  16 +-
 .../commons/compress/archivers/JarTestCase.java |   4 +-
 .../compress/archivers/LongPathTest.java        |  21 +-
 .../compress/archivers/LongSymLinkTest.java     |  21 +-
 .../commons/compress/archivers/TarTestCase.java |  46 +--
 .../commons/compress/archivers/ZipTestCase.java | 132 ++++-----
 .../archivers/ar/ArArchiveInputStreamTest.java  |   6 +-
 .../archivers/ar/ArArchiveOutputStreamTest.java |  10 +-
 .../arj/ArjArchiveInputStreamTest.java          |  18 +-
 .../cpio/CpioArchiveInputStreamTest.java        |   8 +-
 .../cpio/CpioArchiveOutputStreamTest.java       |   2 +-
 .../archivers/dump/DumpArchiveEntryTest.java    |   4 +-
 .../dump/DumpArchiveInputStreamTest.java        |  16 +-
 .../jar/JarArchiveOutputStreamTest.java         |   4 +-
 .../memory/MemoryArchiveInputStream.java        |   2 +-
 .../archivers/sevenz/SevenZFileTest.java        |  66 ++---
 .../archivers/sevenz/SevenZOutputFileTest.java  |  58 ++--
 .../compress/archivers/tar/BigFilesIT.java      |  10 +-
 .../compress/archivers/tar/SparseFilesTest.java |   8 +-
 .../archivers/tar/TarArchiveEntryTest.java      |  16 +-
 .../tar/TarArchiveInputStreamTest.java          |  70 ++---
 .../tar/TarArchiveOutputStreamTest.java         | 286 +++++++++----------
 .../compress/archivers/tar/TarLister.java       |   6 +-
 .../compress/archivers/tar/TarUtilsTest.java    |  52 ++--
 .../archivers/zip/AsiExtraFieldTest.java        |  10 +-
 .../compress/archivers/zip/BinaryTreeTest.java  |   6 +-
 .../compress/archivers/zip/BitStreamTest.java   |  10 +-
 .../archivers/zip/CircularBufferTest.java       |   6 +-
 .../archivers/zip/EncryptedArchiveTest.java     |  14 +-
 .../archivers/zip/ExplodeSupportTest.java       |  18 +-
 .../archivers/zip/ExtraFieldUtilsTest.java      |  32 +--
 .../archivers/zip/GeneralPurposeBitTest.java    |  18 +-
 .../commons/compress/archivers/zip/Lister.java  |  22 +-
 .../archivers/zip/Maven221MultiVolumeTest.java  |  14 +-
 .../zip/ParallelScatterZipCreatorTest.java      |  38 +--
 .../archivers/zip/ScatterSampleTest.java        |  20 +-
 .../zip/ScatterZipOutputStreamTest.java         |  12 +-
 .../archivers/zip/StreamCompressorTest.java     |  10 +-
 .../archivers/zip/UTF8ZipFilesTest.java         |  52 ++--
 .../compress/archivers/zip/X000A_NTFSTest.java  |   6 +-
 .../zip/X5455_ExtendedTimestampTest.java        |  54 ++--
 .../archivers/zip/X7875_NewUnixTest.java        |  12 +-
 .../Zip64ExtendedInformationExtraFieldTest.java |  48 ++--
 .../compress/archivers/zip/Zip64SupportIT.java  | 192 ++++++-------
 .../archivers/zip/ZipArchiveEntryTest.java      |  58 ++--
 .../zip/ZipArchiveInputStreamTest.java          |  22 +-
 .../archivers/zip/ZipEightByteIntegerTest.java  |  24 +-
 .../compress/archivers/zip/ZipEncodingTest.java |  12 +-
 .../compress/archivers/zip/ZipFileTest.java     |  52 ++--
 .../compress/archivers/zip/ZipLongTest.java     |  22 +-
 .../compress/archivers/zip/ZipShortTest.java    |  22 +-
 .../compress/archivers/zip/ZipUtilTest.java     |  80 +++---
 .../compress/changes/ChangeSetTestCase.java     | 238 +++++++--------
 .../compress/compressors/BZip2TestCase.java     |   6 +-
 .../compress/compressors/DeflateTestCase.java   |   4 +-
 .../compressors/DetectCompressorTestCase.java   |  22 +-
 .../compressors/FramedSnappyTestCase.java       |   2 +-
 .../compress/compressors/GZipTestCase.java      |  58 ++--
 .../compress/compressors/Pack200TestCase.java   |  18 +-
 .../compress/compressors/XZTestCase.java        |   2 +-
 .../bzip2/BZip2CompressorInputStreamTest.java   |  14 +-
 .../compressors/bzip2/BlockSortTest.java        |  20 +-
 .../bzip2/PythonTruncatedBzip2Test.java         |  18 +-
 .../DeflateCompressorInputStreamTest.java       |   8 +-
 .../DeflateCompressorOutputStreamTest.java      |   4 +-
 .../deflate/DeflateParametersTest.java          |   6 +-
 .../compressors/lzma/LZMAUtilsTestCase.java     |   2 +-
 .../compressors/pack200/Pack200UtilsTest.java   |   8 +-
 .../FramedSnappyCompressorInputStreamTest.java  |  18 +-
 .../xz/XZCompressorInputStreamTest.java         |   2 +-
 .../compressors/xz/XZUtilsTestCase.java         |   2 +-
 .../compress/utils/BitInputStreamTest.java      |  24 +-
 .../compress/utils/CountingStreamTest.java      |   8 +-
 .../commons/compress/utils/IOUtilsTest.java     |   4 +-
 180 files changed, 1969 insertions(+), 1965 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java
index 2cd85c7..afd3c4a 100644
--- a/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java
@@ -78,7 +78,7 @@ public abstract class ArchiveInputStream extends InputStream {
      */
     @Override
     public int read() throws IOException {
-        int num = read(SINGLE, 0, 1);
+        final int num = read(SINGLE, 0, 1);
         return num == -1 ? -1 : SINGLE[0] & BYTE_MASK;
     }
 

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java
----------------------------------------------------------------------
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 d5370c4..cff42ee 100644
--- a/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java
+++ b/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java
@@ -275,7 +275,7 @@ public class ArchiveStreamFactory {
             return new ArArchiveOutputStream(out);
         }
         if (ZIP.equalsIgnoreCase(archiverName)) {
-            ZipArchiveOutputStream zip = new ZipArchiveOutputStream(out);
+            final ZipArchiveOutputStream zip = new ZipArchiveOutputStream(out);
             if (entryEncoding != null) {
                 zip.setEncoding(entryEncoding);
             }
@@ -372,7 +372,7 @@ public class ArchiveStreamFactory {
                     if (tais.getNextTarEntry().isCheckSumOK()) {
                         return createArchiveInputStream(TAR, in);
                     }
-                } catch (Exception e) { // NOPMD
+                } catch (final Exception e) { // NOPMD
                     // can generate IllegalArgumentException as well
                     // as IOException
                     // autodetection, simply not a TAR
@@ -381,7 +381,7 @@ public class ArchiveStreamFactory {
                     IOUtils.closeQuietly(tais);
                 }
             }
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new ArchiveException("Could not use reset and mark operations.", e);
         }
 

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/Lister.java
----------------------------------------------------------------------
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 8de2ac9..c832e66 100644
--- a/src/main/java/org/apache/commons/compress/archivers/Lister.java
+++ b/src/main/java/org/apache/commons/compress/archivers/Lister.java
@@ -40,11 +40,11 @@ public final class Lister {
             return;
         }
         System.out.println("Analysing "+args[0]);
-        File f = new File(args[0]);
+        final File f = new File(args[0]);
         if (!f.isFile()) {
             System.err.println(f + " doesn't exist or is a directory");
         }
-        InputStream fis = new BufferedInputStream(new FileInputStream(f));
+        final InputStream fis = new BufferedInputStream(new FileInputStream(f));
         ArchiveInputStream ais;
         if (args.length > 1) {
             ais = factory.createArchiveInputStream(args[1], fis);

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java
----------------------------------------------------------------------
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 c7d6f8e..adf5d86 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
@@ -177,7 +177,7 @@ public class ArArchiveEntry implements ArchiveEntry {
         if (obj == null || getClass() != obj.getClass()) {
             return false;
         }
-        ArArchiveEntry other = (ArArchiveEntry) obj;
+        final ArArchiveEntry other = (ArArchiveEntry) obj;
         if (name == null) {
             if (other.name != null) {
                 return false;

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
----------------------------------------------------------------------
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 665112c..bcd159d 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
@@ -112,7 +112,7 @@ public class ArArchiveInputStream extends ArchiveInputStream {
         IOUtils.readFully(this, NAME_BUF);
         IOUtils.readFully(this, LAST_MODIFIED_BUF);
         IOUtils.readFully(this, ID_BUF);
-        int userId = asInt(ID_BUF, true);
+        final int userId = asInt(ID_BUF, true);
         IOUtils.readFully(this, ID_BUF);
         IOUtils.readFully(this, FILE_MODE_BUF);
         IOUtils.readFully(this, LENGTH_BUF);
@@ -146,14 +146,14 @@ public class ArArchiveInputStream extends ArchiveInputStream {
         if (temp.endsWith("/")) { // GNU terminator
             temp = temp.substring(0, temp.length() - 1);
         } else if (isGNULongName(temp)) {
-            int off = Integer.parseInt(temp.substring(1));// get the offset
+            final int off = Integer.parseInt(temp.substring(1));// get the offset
             temp = getExtendedName(off); // convert to the long name
         } else if (isBSDLongName(temp)) {
             temp = getBSDLongName(temp);
             // entry length contained the length of the file name in
             // addition to the real length of the entry.
             // assume file name was ASCII, there is no "standard" otherwise
-            int nameLen = temp.length();
+            final int nameLen = temp.length();
             len -= nameLen;
             entryOffset += nameLen;
         }
@@ -203,7 +203,7 @@ public class ArArchiveInputStream extends ArchiveInputStream {
     }
 
     private int asInt(final byte[] input, final int base, final boolean treatBlankAsZero) {
-        String string = ArchiveUtils.toAsciiString(input).trim();
+        final String string = ArchiveUtils.toAsciiString(input).trim();
         if (string.length() == 0 && treatBlankAsZero) {
             return 0;
         }
@@ -342,10 +342,10 @@ public class ArArchiveInputStream extends ArchiveInputStream {
      * @since 1.3
      */
     private String getBSDLongName(final String bsdLongName) throws IOException {
-        int nameLen =
+        final int nameLen =
             Integer.parseInt(bsdLongName.substring(BSD_LONGNAME_PREFIX_LEN));
-        byte[] name = new byte[nameLen];
-        int read = IOUtils.readFully(this, name);
+        final byte[] name = new byte[nameLen];
+        final int read = IOUtils.readFully(this, name);
         if (read != nameLen) {
             throw new EOFException();
         }
@@ -381,9 +381,9 @@ public class ArArchiveInputStream extends ArchiveInputStream {
      * @see #isGNUStringTable
      */
     private ArArchiveEntry readGNUStringTable(final byte[] length) throws IOException {
-        int bufflen = asInt(length); // Assume length will fit in an int
+        final int bufflen = asInt(length); // Assume length will fit in an int
         namebuffer = new byte[bufflen];
-        int read = IOUtils.readFully(this, namebuffer, 0, bufflen);
+        final int read = IOUtils.readFully(this, namebuffer, 0, bufflen);
         if (read != bufflen){
             throw new IOException("Failed to read complete // record: expected="
                                   + bufflen + " read=" + read);

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java
----------------------------------------------------------------------
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 00583a6..aa3a0db 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
@@ -64,7 +64,7 @@ public class ArArchiveOutputStream extends ArchiveOutputStream {
     }
 
     private long writeArchiveHeader() throws IOException {
-        byte [] header = ArchiveUtils.toAsciiBytes(ArArchiveEntry.HEADER);
+        final byte [] header = ArchiveUtils.toAsciiBytes(ArArchiveEntry.HEADER);
         out.write(header);
         return header.length;
     }
@@ -89,7 +89,7 @@ public class ArArchiveOutputStream extends ArchiveOutputStream {
             throw new IOException("Stream has already been finished");
         }
 
-        ArArchiveEntry pArEntry = (ArArchiveEntry)pEntry;
+        final ArArchiveEntry pArEntry = (ArArchiveEntry)pEntry;
         if (prevEntry == null) {
             writeArchiveHeader();
         } else {

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java
----------------------------------------------------------------------
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 4a080b2..a275a43 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
@@ -91,7 +91,7 @@ public class ArjArchiveEntry implements ArchiveEntry {
      */
     @Override
     public Date getLastModifiedDate() {
-        long ts = isHostOsUnix() ? localFileHeader.dateTimeModified * 1000l
+        final long ts = isHostOsUnix() ? localFileHeader.dateTimeModified * 1000l
             : ZipUtil.dosToJavaTime(0xFFFFFFFFL & localFileHeader.dateTimeModified);
         return new Date(ts);
     }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java
index db72a98..b1fd223 100644
--- a/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java
@@ -67,7 +67,7 @@ public class ArjArchiveInputStream extends ArchiveInputStream {
             if ((mainHeader.arjFlags & MainHeader.Flags.VOLUME) != 0) {
                 throw new ArchiveException("Multi-volume ARJ files are unsupported");
             }
-        } catch (IOException ioException) {
+        } catch (final IOException ioException) {
             throw new ArchiveException(ioException.getMessage(), ioException);
         }
     }
@@ -89,7 +89,7 @@ public class ArjArchiveInputStream extends ArchiveInputStream {
     }
 
     private int read8(final DataInputStream dataIn) throws IOException {
-        int value = dataIn.readUnsignedByte();
+        final int value = dataIn.readUnsignedByte();
         count(1);
         return value;
     }
@@ -248,7 +248,7 @@ public class ArjArchiveInputStream extends ArchiveInputStream {
         localFileHeader.name = readString(basicHeader);
         localFileHeader.comment = readString(basicHeader);
 
-        ArrayList<byte[]> extendedHeaders = new ArrayList<byte[]>();
+        final ArrayList<byte[]> extendedHeaders = new ArrayList<byte[]>();
         int extendedHeaderSize;
         while ((extendedHeaderSize = read16(in)) > 0) {
             final byte[] extendedHeaderBytes = new byte[extendedHeaderSize];

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/arj/LocalFileHeader.java
----------------------------------------------------------------------
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 d48dc17..4629213 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
@@ -72,7 +72,7 @@ class LocalFileHeader {
 
     @Override
     public String toString() {
-        StringBuilder builder = new StringBuilder();
+        final StringBuilder builder = new StringBuilder();
         builder.append("LocalFileHeader [archiverVersionNumber=");
         builder.append(archiverVersionNumber);
         builder.append(", minVersionToExtract=");

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java
----------------------------------------------------------------------
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 2b0aa7c..f625dcf 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
@@ -474,7 +474,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry {
         if (name != null) {
             size += name.length();
         }
-        int remain = size % this.alignmentBoundary;
+        final int remain = size % this.alignmentBoundary;
         if (remain > 0){
             return this.alignmentBoundary - remain;
         }
@@ -488,8 +488,8 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry {
      */
     public int getDataPadCount(){
         if (this.alignmentBoundary == 0) { return 0; }
-        long size = this.filesize;
-        int remain = (int) (size % this.alignmentBoundary);
+        final long size = this.filesize;
+        final int remain = (int) (size % this.alignmentBoundary);
         if (remain > 0){
             return this.alignmentBoundary - remain;
         }
@@ -884,7 +884,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry {
         if (obj == null || getClass() != obj.getClass()) {
             return false;
         }
-        CpioArchiveEntry other = (CpioArchiveEntry) obj;
+        final CpioArchiveEntry other = (CpioArchiveEntry) obj;
         if (name == null) {
             if (other.name != null) {
                 return false;

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
index afc91bb..8c69bce 100644
--- a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
@@ -245,7 +245,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements
                              TWO_BYTES_BUF.length);
             readFully(SIX_BYTES_BUF, TWO_BYTES_BUF.length,
                       FOUR_BYTES_BUF.length);
-            String magicString = ArchiveUtils.toAsciiString(SIX_BYTES_BUF);
+            final String magicString = ArchiveUtils.toAsciiString(SIX_BYTES_BUF);
             if (magicString.equals(MAGIC_NEW)) {
                 this.entry = readNewEntry(false);
             } else if (magicString.equals(MAGIC_NEW_CRC)) {
@@ -315,13 +315,13 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements
             }
             return -1; // EOF for this entry
         }
-        int tmplength = (int) Math.min(len, this.entry.getSize()
+        final int tmplength = (int) Math.min(len, this.entry.getSize()
                 - this.entryBytesRead);
         if (tmplength < 0) {
             return -1;
         }
 
-        int tmpread = readFully(b, off, tmplength);
+        final int tmpread = readFully(b, off, tmplength);
         if (this.entry.getFormat() == FORMAT_NEW_CRC) {
             for (int pos = 0; pos < tmpread; pos++) {
                 this.crc += b[pos] & 0xFF;
@@ -334,7 +334,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements
 
     private final int readFully(final byte[] b, final int off, final int len)
             throws IOException {
-        int count = IOUtils.readFully(in, b, off, len);
+        final int count = IOUtils.readFully(in, b, off, len);
         count(count);
         if (count < len) {
             throw new EOFException();
@@ -344,14 +344,14 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements
 
     private long readBinaryLong(final int length, final boolean swapHalfWord)
             throws IOException {
-        byte tmp[] = new byte[length];
+        final byte tmp[] = new byte[length];
         readFully(tmp, 0, tmp.length);
         return CpioUtil.byteArray2long(tmp, swapHalfWord);
     }
 
     private long readAsciiLong(final int length, final int radix)
             throws IOException {
-        byte tmpBuffer[] = new byte[length];
+        final byte tmpBuffer[] = new byte[length];
         readFully(tmpBuffer, 0, tmpBuffer.length);
         return Long.parseLong(ArchiveUtils.toAsciiString(tmpBuffer), radix);
     }
@@ -366,7 +366,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements
         }
 
         ret.setInode(readAsciiLong(8, 16));
-        long mode = readAsciiLong(8, 16);
+        final long mode = readAsciiLong(8, 16);
         if (CpioUtil.fileType(mode) != 0){ // mode is initialised to 0
             ret.setMode(mode);
         }
@@ -379,9 +379,9 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements
         ret.setDeviceMin(readAsciiLong(8, 16));
         ret.setRemoteDeviceMaj(readAsciiLong(8, 16));
         ret.setRemoteDeviceMin(readAsciiLong(8, 16));
-        long namesize = readAsciiLong(8, 16);
+        final long namesize = readAsciiLong(8, 16);
         ret.setChksum(readAsciiLong(8, 16));
-        String name = readCString((int) namesize);
+        final String name = readCString((int) namesize);
         ret.setName(name);
         if (CpioUtil.fileType(mode) == 0 && !name.equals(CPIO_TRAILER)){
             throw new IOException("Mode 0 only allowed in the trailer. Found entry name: "+name + " Occured at byte: " + getBytesRead());
@@ -392,7 +392,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements
     }
 
     private CpioArchiveEntry readOldAsciiEntry() throws IOException {
-        CpioArchiveEntry ret = new CpioArchiveEntry(FORMAT_OLD_ASCII);
+        final CpioArchiveEntry ret = new CpioArchiveEntry(FORMAT_OLD_ASCII);
 
         ret.setDevice(readAsciiLong(6, 8));
         ret.setInode(readAsciiLong(6, 8));
@@ -405,7 +405,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements
         ret.setNumberOfLinks(readAsciiLong(6, 8));
         ret.setRemoteDevice(readAsciiLong(6, 8));
         ret.setTime(readAsciiLong(11, 8));
-        long namesize = readAsciiLong(6, 8);
+        final long namesize = readAsciiLong(6, 8);
         ret.setSize(readAsciiLong(11, 8));
         final String name = readCString((int) namesize);
         ret.setName(name);
@@ -418,7 +418,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements
 
     private CpioArchiveEntry readOldBinaryEntry(final boolean swapHalfWord)
             throws IOException {
-        CpioArchiveEntry ret = new CpioArchiveEntry(FORMAT_OLD_BINARY);
+        final CpioArchiveEntry ret = new CpioArchiveEntry(FORMAT_OLD_BINARY);
 
         ret.setDevice(readBinaryLong(2, swapHalfWord));
         ret.setInode(readBinaryLong(2, swapHalfWord));
@@ -431,7 +431,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements
         ret.setNumberOfLinks(readBinaryLong(2, swapHalfWord));
         ret.setRemoteDevice(readBinaryLong(2, swapHalfWord));
         ret.setTime(readBinaryLong(4, swapHalfWord));
-        long namesize = readBinaryLong(2, swapHalfWord);
+        final long namesize = readBinaryLong(2, swapHalfWord);
         ret.setSize(readBinaryLong(4, swapHalfWord));
         final String name = readCString((int) namesize);
         ret.setName(name);
@@ -445,7 +445,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements
 
     private String readCString(final int length) throws IOException {
         // don't include trailing NUL in file name to decode
-        byte tmpBuffer[] = new byte[length - 1];
+        final byte tmpBuffer[] = new byte[length - 1];
         readFully(tmpBuffer, 0, tmpBuffer.length);
         this.in.read();
         return zipEncoding.decode(tmpBuffer);
@@ -468,7 +468,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements
             throw new IllegalArgumentException("negative skip length");
         }
         ensureOpen();
-        int max = (int) Math.min(n, Integer.MAX_VALUE);
+        final int max = (int) Math.min(n, Integer.MAX_VALUE);
         int total = 0;
 
         while (total < max) {
@@ -495,11 +495,11 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements
      * Skips the padding zeros written after the TRAILER!!! entry.
      */
     private void skipRemainderOfLastBlock() throws IOException {
-        long readFromLastBlock = getBytesRead() % blockSize;
+        final long readFromLastBlock = getBytesRead() % blockSize;
         long remainingBytes = readFromLastBlock == 0 ? 0
             : blockSize - readFromLastBlock;
         while (remainingBytes > 0) {
-            long skipped = skip(blockSize - readFromLastBlock);
+            final long skipped = skip(blockSize - readFromLastBlock);
             if (skipped <= 0) {
                 break;
             }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java
----------------------------------------------------------------------
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 13d4270..eb51484 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
@@ -222,7 +222,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements
             throw new IOException("Stream has already been finished");
         }
 
-        CpioArchiveEntry e = (CpioArchiveEntry) entry;
+        final CpioArchiveEntry e = (CpioArchiveEntry) entry;
         ensureOpen();
         if (this.entry != null) {
             closeArchiveEntry(); // close previous entry
@@ -263,7 +263,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements
             writeOldAsciiEntry(e);
             break;
         case FORMAT_OLD_BINARY:
-            boolean swapHalfWord = true;
+            final boolean swapHalfWord = true;
             writeBinaryLong(MAGIC_OLD_BINARY, 2, swapHalfWord);
             writeOldBinaryEntry(e, swapHalfWord);
             break;
@@ -464,7 +464,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements
         writeHeader(this.entry);
         closeArchiveEntry();
 
-        int lengthOfLastBlock = (int) (getBytesWritten() % blockSize);
+        final int lengthOfLastBlock = (int) (getBytesWritten() % blockSize);
         if (lengthOfLastBlock != 0) {
             pad(blockSize - lengthOfLastBlock);
         }
@@ -493,7 +493,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements
 
     private void pad(final int count) throws IOException{
         if (count > 0){
-            byte buff[] = new byte[count];
+            final byte buff[] = new byte[count];
             out.write(buff);
             count(count);
         }
@@ -501,14 +501,14 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements
 
     private void writeBinaryLong(final long number, final int length,
             final boolean swapHalfWord) throws IOException {
-        byte tmp[] = CpioUtil.long2byteArray(number, length, swapHalfWord);
+        final byte tmp[] = CpioUtil.long2byteArray(number, length, swapHalfWord);
         out.write(tmp);
         count(tmp.length);
     }
 
     private void writeAsciiLong(final long number, final int length,
             final int radix) throws IOException {
-        StringBuilder tmp = new StringBuilder();
+        final StringBuilder tmp = new StringBuilder();
         String tmpStr;
         if (radix == 16) {
             tmp.append(Long.toHexString(number));
@@ -519,7 +519,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements
         }
 
         if (tmp.length() <= length) {
-            long insertLength = length - tmp.length();
+            final long insertLength = length - tmp.length();
             for (int pos = 0; pos < insertLength; pos++) {
                 tmp.insert(0, "0");
             }
@@ -527,7 +527,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements
         } else {
             tmpStr = tmp.substring(tmp.length() - length);
         }
-        byte[] b = ArchiveUtils.toAsciiBytes(tmpStr);
+        final byte[] b = ArchiveUtils.toAsciiBytes(tmpStr);
         out.write(b);
         count(b.length);
     }
@@ -538,7 +538,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements
      * @throws IOException if the string couldn't be written
      */
     private void writeCString(final String str) throws IOException {
-        ByteBuffer buf = zipEncoding.encode(str);
+        final ByteBuffer buf = zipEncoding.encode(str);
         final int len = buf.limit() - buf.position();
         out.write(buf.array(), buf.arrayOffset(), len);
         out.write('\0');

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioUtil.java b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioUtil.java
index efc1584..aba485f 100644
--- a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioUtil.java
+++ b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioUtil.java
@@ -50,7 +50,7 @@ class CpioUtil {
 
         long ret = 0;
         int pos = 0;
-        byte tmp_number[] = new byte[number.length];
+        final byte tmp_number[] = new byte[number.length];
         System.arraycopy(number, 0, tmp_number, 0, number.length);
 
         if (!swapHalfWord) {
@@ -86,7 +86,7 @@ class CpioUtil {
      */
     static byte[] long2byteArray(final long number, final int length,
             final boolean swapHalfWord) {
-        byte[] ret = new byte[length];
+        final byte[] ret = new byte[length];
         int pos = 0;
         long tmp_number = 0;
 

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveConstants.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveConstants.java b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveConstants.java
index 15738e5..f51914b 100644
--- a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveConstants.java
+++ b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveConstants.java
@@ -54,7 +54,7 @@ public final class DumpArchiveConstants {
         }
 
         public static SEGMENT_TYPE find(final int code) {
-            for (SEGMENT_TYPE t : values()) {
+            for (final SEGMENT_TYPE t : values()) {
                 if (t.code == code) {
                     return t;
                 }
@@ -79,7 +79,7 @@ public final class DumpArchiveConstants {
         }
 
         public static COMPRESSION_TYPE find(final int code) {
-            for (COMPRESSION_TYPE t : values()) {
+            for (final COMPRESSION_TYPE t : values()) {
                 if (t.code == code) {
                     return t;
                 }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
index 43fecde..caeb25a 100644
--- a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
@@ -407,7 +407,7 @@ public class DumpArchiveEntry implements ArchiveEntry {
             return false;
         }
 
-        DumpArchiveEntry rhs = (DumpArchiveEntry) o;
+        final DumpArchiveEntry rhs = (DumpArchiveEntry) o;
 
         if ((header == null) || (rhs.header == null)) {
             return false;
@@ -437,8 +437,8 @@ public class DumpArchiveEntry implements ArchiveEntry {
      * @param buffer buffer to read content from
      */
     static DumpArchiveEntry parse(final byte[] buffer) {
-        DumpArchiveEntry entry = new DumpArchiveEntry();
-        TapeSegmentHeader header = entry.header;
+        final DumpArchiveEntry entry = new DumpArchiveEntry();
+        final TapeSegmentHeader header = entry.header;
 
         header.type = DumpArchiveConstants.SEGMENT_TYPE.find(DumpArchiveUtil.convert32(
                     buffer, 0));
@@ -452,7 +452,7 @@ public class DumpArchiveEntry implements ArchiveEntry {
 
         //header.magic = DumpArchiveUtil.convert32(buffer, 24);
         //header.checksum = DumpArchiveUtil.convert32(buffer, 28);
-        int m = DumpArchiveUtil.convert16(buffer, 32);
+        final int m = DumpArchiveUtil.convert16(buffer, 32);
 
         // determine the type of the file.
         entry.setType(TYPE.find((m >> 12) & 0x0F));
@@ -792,7 +792,7 @@ public class DumpArchiveEntry implements ArchiveEntry {
         public static TYPE find(final int code) {
             TYPE type = UNKNOWN;
 
-            for (TYPE t : TYPE.values()) {
+            for (final TYPE t : TYPE.values()) {
                 if (code == t.code) {
                     type = t;
                 }
@@ -823,9 +823,9 @@ public class DumpArchiveEntry implements ArchiveEntry {
         }
 
         public static Set<PERMISSION> find(final int code) {
-            Set<PERMISSION> set = new HashSet<PERMISSION>();
+            final Set<PERMISSION> set = new HashSet<PERMISSION>();
 
-            for (PERMISSION p : PERMISSION.values()) {
+            for (final PERMISSION p : PERMISSION.values()) {
                 if ((code & p.code) == p.code) {
                     set.add(p);
                 }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
index 3083678..23d7245 100644
--- a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
@@ -108,7 +108,7 @@ public class DumpArchiveInputStream extends ArchiveInputStream {
 
         try {
             // read header, verify it's a dump archive.
-            byte[] headerBytes = raw.readRecord();
+            final byte[] headerBytes = raw.readRecord();
 
             if (!DumpArchiveUtil.verify(headerBytes)) {
                 throw new UnrecognizedFormatException();
@@ -126,12 +126,12 @@ public class DumpArchiveInputStream extends ArchiveInputStream {
             // skip past CLRI and BITS segments since we don't handle them yet.
             readCLRI();
             readBITS();
-        } catch (IOException ex) {
+        } catch (final IOException ex) {
             throw new ArchiveException(ex.getMessage(), ex);
         }
 
         // put in a dummy record for the root node.
-        Dirent root = new Dirent(2, 2, 4, ".");
+        final Dirent root = new Dirent(2, 2, 4, ".");
         names.put(2, root);
 
         // use priority based on queue to ensure parent directories are
@@ -172,7 +172,7 @@ public class DumpArchiveInputStream extends ArchiveInputStream {
      * Read CLRI (deleted inode) segment.
      */
     private void readCLRI() throws IOException {
-        byte[] buffer = raw.readRecord();
+        final byte[] buffer = raw.readRecord();
 
         if (!DumpArchiveUtil.verify(buffer)) {
             throw new InvalidFormatException();
@@ -196,7 +196,7 @@ public class DumpArchiveInputStream extends ArchiveInputStream {
      * Read BITS segment.
      */
     private void readBITS() throws IOException {
-        byte[] buffer = raw.readRecord();
+        final byte[] buffer = raw.readRecord();
 
         if (!DumpArchiveUtil.verify(buffer)) {
             throw new InvalidFormatException();
@@ -338,7 +338,7 @@ public class DumpArchiveInputStream extends ArchiveInputStream {
                 pending.put(entry.getIno(), entry);
             }
 
-            int datalen = DumpArchiveConstants.TP_SIZE * entry.getHeaderCount();
+            final int datalen = DumpArchiveConstants.TP_SIZE * entry.getHeaderCount();
 
             if (blockBuffer.length < datalen) {
                 blockBuffer = new byte[datalen];
@@ -352,19 +352,19 @@ public class DumpArchiveInputStream extends ArchiveInputStream {
 
             for (int i = 0; i < datalen - 8 && i < size - 8;
                     i += reclen) {
-                int ino = DumpArchiveUtil.convert32(blockBuffer, i);
+                final int ino = DumpArchiveUtil.convert32(blockBuffer, i);
                 reclen = DumpArchiveUtil.convert16(blockBuffer, i + 4);
 
-                byte type = blockBuffer[i + 6];
+                final byte type = blockBuffer[i + 6];
 
-                String name = DumpArchiveUtil.decode(zipEncoding, blockBuffer, i + 8, blockBuffer[i + 7]);
+                final String name = DumpArchiveUtil.decode(zipEncoding, blockBuffer, i + 8, blockBuffer[i + 7]);
 
                 if (".".equals(name) || "..".equals(name)) {
                     // do nothing...
                     continue;
                 }
 
-                Dirent d = new Dirent(ino, entry.getIno(), type, name);
+                final Dirent d = new Dirent(ino, entry.getIno(), type, name);
 
                 /*
                 if ((type == 4) && names.containsKey(ino)) {
@@ -376,8 +376,8 @@ public class DumpArchiveInputStream extends ArchiveInputStream {
                 names.put(ino, d);
 
                 // check whether this allows us to fill anything in the pending list.
-                for (Map.Entry<Integer, DumpArchiveEntry> e : pending.entrySet()) {
-                    String path = getPath(e.getValue());
+                for (final Map.Entry<Integer, DumpArchiveEntry> e : pending.entrySet()) {
+                    final String path = getPath(e.getValue());
 
                     if (path != null) {
                         e.getValue().setName(path);
@@ -389,12 +389,12 @@ public class DumpArchiveInputStream extends ArchiveInputStream {
 
                 // remove anything that we found. (We can't do it earlier
                 // because of concurrent modification exceptions.)
-                for (DumpArchiveEntry e : queue) {
+                for (final DumpArchiveEntry e : queue) {
                     pending.remove(e.getIno());
                 }
             }
 
-            byte[] peekBytes = raw.peek();
+            final byte[] peekBytes = raw.peek();
 
             if (!DumpArchiveUtil.verify(peekBytes)) {
                 throw new InvalidFormatException();
@@ -415,7 +415,7 @@ public class DumpArchiveInputStream extends ArchiveInputStream {
     private String getPath(final DumpArchiveEntry entry) {
         // build the stack of elements. It's possible that we're 
         // still missing an intermediate value and if so we
-        Stack<String> elements = new Stack<String>();
+        final Stack<String> elements = new Stack<String>();
         Dirent dirent = null;
 
         for (int i = entry.getIno();; i = dirent.getParentIno()) {
@@ -440,7 +440,7 @@ public class DumpArchiveInputStream extends ArchiveInputStream {
         }
 
         // generate full path from stack of elements.
-        StringBuilder sb = new StringBuilder(elements.pop());
+        final StringBuilder sb = new StringBuilder(elements.pop());
 
         while (!elements.isEmpty()) {
             sb.append('/');
@@ -480,7 +480,7 @@ public class DumpArchiveInputStream extends ArchiveInputStream {
         }
 
         while (len > 0) {
-            int sz = len > readBuf.length - recordOffset
+            final int sz = len > readBuf.length - recordOffset
                 ? readBuf.length - recordOffset : len;
 
             // copy any data we have
@@ -495,7 +495,7 @@ public class DumpArchiveInputStream extends ArchiveInputStream {
             // load next block if necessary.
             if (len > 0) {
                 if (readIdx >= 512) {
-                    byte[] headerBytes = raw.readRecord();
+                    final byte[] headerBytes = raw.readRecord();
 
                     if (!DumpArchiveUtil.verify(headerBytes)) {
                         throw new InvalidFormatException();
@@ -506,7 +506,7 @@ public class DumpArchiveInputStream extends ArchiveInputStream {
                 }
 
                 if (!active.isSparseRecord(readIdx++)) {
-                    int r = raw.read(readBuf, 0, readBuf.length);
+                    final int r = raw.read(readBuf, 0, readBuf.length);
                     if (r != readBuf.length) {
                         throw new EOFException();
                     }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveSummary.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveSummary.java b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveSummary.java
index 6813608..f17e70f 100644
--- a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveSummary.java
+++ b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveSummary.java
@@ -316,7 +316,7 @@ public class DumpArchiveSummary {
             return false;
         }
 
-        DumpArchiveSummary rhs = (DumpArchiveSummary) o;
+        final DumpArchiveSummary rhs = (DumpArchiveSummary) o;
 
         if (dumpDate != rhs.dumpDate) {
             return false;

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java
index 315064a..6d52ceb 100644
--- a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java
+++ b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java
@@ -55,14 +55,14 @@ class DumpArchiveUtil {
      */
     public static final boolean verify(final byte[] buffer) {
         // verify magic. for now only accept NFS_MAGIC.
-        int magic = convert32(buffer, 24);
+        final int magic = convert32(buffer, 24);
 
         if (magic != DumpArchiveConstants.NFS_MAGIC) {
             return false;
         }
 
         //verify checksum...
-        int checksum = convert32(buffer, 28);
+        final int checksum = convert32(buffer, 28);
 
         if (checksum != calculateChecksum(buffer)) {
             return false;
@@ -138,7 +138,7 @@ class DumpArchiveUtil {
      */
     static String decode(final ZipEncoding encoding, final byte[] b, final int offset, final int len)
         throws IOException {
-        byte[] copy = new byte[len];
+        final byte[] copy = new byte[len];
         System.arraycopy(b, offset, copy, 0, len);
         return encoding.decode(copy);
     }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java
----------------------------------------------------------------------
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 9a0b098..08c6a00 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
@@ -71,7 +71,7 @@ class TapeInputStream extends FilterInputStream {
         blockSize = recordSize * recsPerBlock;
 
         // save first block in case we need it again
-        byte[] oldBuffer = blockBuffer;
+        final byte[] oldBuffer = blockBuffer;
 
         // read rest of new block
         blockBuffer = new byte[blockSize];
@@ -223,7 +223,7 @@ class TapeInputStream extends FilterInputStream {
         }
 
         // copy data, increment counters.
-        byte[] b = new byte[recordSize];
+        final byte[] b = new byte[recordSize];
         System.arraycopy(blockBuffer, readOffset, b, 0, b.length);
 
         return b;
@@ -236,7 +236,7 @@ class TapeInputStream extends FilterInputStream {
      * @throws IOException on error
      */
     public byte[] readRecord() throws IOException {
-        byte[] result = new byte[recordSize];
+        final byte[] result = new byte[recordSize];
 
         // the read implementation will loop internally as long as
         // input is available
@@ -271,8 +271,8 @@ class TapeInputStream extends FilterInputStream {
             }
             bytesRead += 4;
 
-            int h = DumpArchiveUtil.convert32(blockBuffer, 0);
-            boolean compressed = (h & 0x01) == 0x01;
+            final int h = DumpArchiveUtil.convert32(blockBuffer, 0);
+            final boolean compressed = (h & 0x01) == 0x01;
 
             if (!compressed) {
                 // file is compressed but this block is not.
@@ -280,9 +280,9 @@ class TapeInputStream extends FilterInputStream {
                 bytesRead += blockSize;
             } else {
                 // this block is compressed.
-                int flags = (h >> 1) & 0x07;
+                final int flags = (h >> 1) & 0x07;
                 int length = (h >> 4) & 0x0FFFFFFF;
-                byte[] compBuffer = new byte[length];
+                final byte[] compBuffer = new byte[length];
                 success = readFully(compBuffer, 0, length);
                 bytesRead += length;
 
@@ -294,7 +294,7 @@ class TapeInputStream extends FilterInputStream {
                         0x03)) {
                     case ZLIB:
 
-                        Inflater inflator = new Inflater();
+                        final Inflater inflator = new Inflater();
                         try {
                             inflator.setInput(compBuffer, 0, compBuffer.length);
                             length = inflator.inflate(blockBuffer);
@@ -302,7 +302,7 @@ class TapeInputStream extends FilterInputStream {
                             if (length != blockSize) {
                                 throw new ShortFileException();
                             }
-                        } catch (DataFormatException e) {
+                        } catch (final DataFormatException e) {
                             throw new DumpArchiveException("bad data", e);
                         } finally {
                             inflator.end();
@@ -336,7 +336,7 @@ class TapeInputStream extends FilterInputStream {
      */
     private boolean readFully(final byte[] b, final int off, final int len)
         throws IOException {
-        int count = IOUtils.readFully(in, b, off, len);
+        final int count = IOUtils.readFully(in, b, off, len);
         if (count < len) {
             throw new ShortFileException();
         }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
index 5974dce..835c840 100644
--- a/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
@@ -75,7 +75,7 @@ public class JarArchiveEntry extends ZipArchiveEntry {
     @Deprecated
     public Certificate[] getCertificates() {
         if (certificates != null) { // never true currently
-            Certificate[] certs = new Certificate[certificates.length];
+            final Certificate[] certs = new Certificate[certificates.length];
             System.arraycopy(certificates, 0, certs, 0, certs.length);
             return certs;
         }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java
index 6ed5249..95f4788 100644
--- a/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java
@@ -53,7 +53,7 @@ public class JarArchiveInputStream extends ZipArchiveInputStream {
     }
 
     public JarArchiveEntry getNextJarEntry() throws IOException {
-        ZipArchiveEntry entry = getNextZipEntry();
+        final ZipArchiveEntry entry = getNextZipEntry();
         return entry == null ? null : new JarArchiveEntry(entry);
     }
 

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/sevenz/AES256SHA256Decoder.java
----------------------------------------------------------------------
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 6406e16..c320d9f 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
@@ -67,7 +67,7 @@ class AES256SHA256Decoder extends CoderBase {
                     final MessageDigest digest;
                     try {
                         digest = MessageDigest.getInstance("SHA-256");
-                    } catch (NoSuchAlgorithmException noSuchAlgorithmException) {
+                    } catch (final NoSuchAlgorithmException noSuchAlgorithmException) {
                         throw new IOException("SHA-256 is unsupported by your Java implementation",
                             noSuchAlgorithmException);
                     }
@@ -93,7 +93,7 @@ class AES256SHA256Decoder extends CoderBase {
                     cipherInputStream = new CipherInputStream(in, cipher);
                     isInitialized = true;
                     return cipherInputStream;
-                } catch (GeneralSecurityException generalSecurityException) {
+                } catch (final GeneralSecurityException generalSecurityException) {
                     throw new IOException("Decryption error " +
                         "(do you have the JCE Unlimited Strength Jurisdiction Policy Files installed?)",
                         generalSecurityException);

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java
index 4606f0c..1252fcf 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java
@@ -49,9 +49,9 @@ public class CLI {
             }
 
             private String getContentMethods(final SevenZArchiveEntry entry) {
-                StringBuilder sb = new StringBuilder();
+                final StringBuilder sb = new StringBuilder();
                 boolean first = true;
-                for (SevenZMethodConfiguration m : entry.getContentMethods()) {
+                for (final SevenZMethodConfiguration m : entry.getContentMethods()) {
                     if (!first) {
                         sb.append(", ");
                     }
@@ -68,7 +68,7 @@ public class CLI {
             @Override
             public void takeAction(final SevenZFile archive, final SevenZArchiveEntry entry) 
                 throws IOException {
-                File outFile = new File(entry.getName());
+                final File outFile = new File(entry.getName());
                 if (entry.isDirectory()) {
                     if (!outFile.isDirectory() && !outFile.mkdirs()) {
                         throw new IOException("Cannot create directory " + outFile);
@@ -78,17 +78,17 @@ public class CLI {
                 }
 
                 System.out.println("extracting to " + outFile);
-                File parent = outFile.getParentFile();
+                final File parent = outFile.getParentFile();
                 if (parent != null && !parent.exists() && !parent.mkdirs()) {
                     throw new IOException("Cannot create " + parent);
                 }
-                FileOutputStream fos = new FileOutputStream(outFile);
+                final FileOutputStream fos = new FileOutputStream(outFile);
                 try {
                     final long total = entry.getSize();
                     long off = 0;
                     while (off < total) {
-                        int toRead = (int) Math.min(total - off, BUF.length);
-                        int bytesRead = archive.read(BUF, 0, toRead);
+                        final int toRead = (int) Math.min(total - off, BUF.length);
+                        final int bytesRead = archive.read(BUF, 0, toRead);
                         if (bytesRead < 1) {
                             throw new IOException("reached end of entry "
                                                   + entry.getName()
@@ -121,13 +121,13 @@ public class CLI {
             usage();
             return;
         }
-        Mode mode = grabMode(args);
+        final Mode mode = grabMode(args);
         System.out.println(mode.getMessage() + " " + args[0]);
-        File f = new File(args[0]);
+        final File f = new File(args[0]);
         if (!f.isFile()) {
             System.err.println(f + " doesn't exist or is a directory");
         }
-        SevenZFile archive = new SevenZFile(f);
+        final SevenZFile archive = new SevenZFile(f);
         try {
             SevenZArchiveEntry ae;
             while((ae=archive.getNextEntry()) != null) {

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/sevenz/CoderBase.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/CoderBase.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/CoderBase.java
index fffef1d..153f58c 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/CoderBase.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/CoderBase.java
@@ -39,7 +39,7 @@ abstract class CoderBase {
      * @return whether this method can extract options from the given object.
      */
     boolean canAcceptOptions(final Object opts) {
-        for (Class<?> c : acceptableOptions) {
+        for (final Class<?> c : acceptableOptions) {
             if (c.isInstance(opts)) {
                 return true;
             }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/sevenz/Coders.java
----------------------------------------------------------------------
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 727989c..1d7244b 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) throws IOException {
-        CoderBase cb = findByMethod(SevenZMethod.byId(coder.decompressionMethodId));
+        final CoderBase cb = findByMethod(SevenZMethod.byId(coder.decompressionMethodId));
         if (cb == null) {
             throw new IOException("Unsupported compression method " +
                                   Arrays.toString(coder.decompressionMethodId)
@@ -80,7 +80,7 @@ class Coders {
     
     static OutputStream addEncoder(final OutputStream out, final SevenZMethod method,
                                    final Object options) throws IOException {
-        CoderBase cb = findByMethod(method);
+        final CoderBase cb = findByMethod(method);
         if (cb == null) {
             throw new IOException("Unsupported compression method " + method);
         }
@@ -103,7 +103,7 @@ class Coders {
         @Override
         InputStream decode(final String archiveName, final InputStream in, final long uncompressedLength,
                 final Coder coder, final byte[] password) throws IOException {
-            byte propsByte = coder.properties[0];
+            final byte propsByte = coder.properties[0];
             long dictSize = coder.properties[1];
             for (int i = 1; i < 4; i++) {
                 dictSize |= (coder.properties[i + 1] & 0xffl) << (8 * i);
@@ -126,7 +126,7 @@ class Coders {
                 final Coder coder, final byte[] password) throws IOException {
             try {
                 return opts.getInputStream(in);
-            } catch (AssertionError e) {
+            } catch (final AssertionError e) {
                 throw new IOException("BCJ filter used in " + archiveName
                                       + " needs XZ for Java > 1.4 - see "
                                       + "http://commons.apache.org/proper/commons-compress/limitations.html#7Z",
@@ -184,7 +184,7 @@ class Coders {
         }
         @Override
         OutputStream encode(final OutputStream out, final Object options) {
-            int level = numberOptionOrDefault(options, 9);
+            final int level = numberOptionOrDefault(options, 9);
             final Deflater deflater = new Deflater(level, true);
             final DeflaterOutputStream deflaterOutputStream = new DeflaterOutputStream(out, deflater);
             return new OutputStream() {
@@ -229,7 +229,7 @@ class Coders {
         @Override
         OutputStream encode(final OutputStream out, final Object options)
                 throws IOException {
-            int blockSize = numberOptionOrDefault(options, BZip2CompressorOutputStream.MAX_BLOCKSIZE);
+            final int blockSize = numberOptionOrDefault(options, BZip2CompressorOutputStream.MAX_BLOCKSIZE);
             return new BZip2CompressorOutputStream(out, blockSize);
         }
     }
@@ -259,7 +259,7 @@ class Coders {
 
         @Override
         public int read(final byte[] b, final int off, final int len) throws IOException {
-            int result = super.read(b, off, len);
+            final int result = super.read(b, off, len);
             if (result == -1 && addDummyByte) {
                 addDummyByte = false;
                 b[off] = 0;

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/sevenz/DeltaDecoder.java
----------------------------------------------------------------------
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 755b3e4..e109b02 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
@@ -37,10 +37,10 @@ class DeltaDecoder extends CoderBase {
 
     @Override
     OutputStream encode(final OutputStream out, final Object options) throws IOException {
-        int distance = numberOptionOrDefault(options, 1);
+        final int distance = numberOptionOrDefault(options, 1);
         try {
             return new DeltaOptions(distance).getOutputStream(new FinishableWrapperOutputStream(out));
-        } catch (UnsupportedOptionsException ex) {
+        } catch (final UnsupportedOptionsException ex) {
             throw new IOException(ex.getMessage());
         }
     }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/sevenz/Folder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/Folder.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/Folder.java
index 3101293..5cffd0d 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/Folder.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/Folder.java
@@ -52,11 +52,11 @@ class Folder {
      * from the output of the first and so on.</p>
      */
     Iterable<Coder> getOrderedCoders() {
-        LinkedList<Coder> l = new LinkedList<Coder>();
+        final LinkedList<Coder> l = new LinkedList<Coder>();
         int current = (int) packedStreams[0]; // more that 2^31 coders?
         while (current != -1) {
             l.addLast(coders[current]);
-            int pair = findBindPairForOutStream(current);
+            final int pair = findBindPairForOutStream(current);
             current = pair != -1 ? (int) bindPairs[pair].inIndex : -1;
         }
         return l;

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMA2Decoder.java
----------------------------------------------------------------------
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 72dade4..0f13ca9 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
@@ -35,9 +35,9 @@ class LZMA2Decoder extends CoderBase {
     InputStream decode(final String archiveName, final InputStream in, final long uncompressedLength,
             final Coder coder, final byte[] password) throws IOException {
         try {
-            int dictionarySize = getDictionarySize(coder);
+            final int dictionarySize = getDictionarySize(coder);
             return new LZMA2InputStream(in, dictionarySize);
-        } catch (IllegalArgumentException ex) {
+        } catch (final IllegalArgumentException ex) {
             throw new IOException(ex.getMessage());
         }
     }
@@ -45,16 +45,16 @@ class LZMA2Decoder extends CoderBase {
     @Override
     OutputStream encode(final OutputStream out, final Object opts)
         throws IOException {
-        LZMA2Options options = getOptions(opts);
-        FinishableOutputStream wrapped = new FinishableWrapperOutputStream(out);
+        final LZMA2Options options = getOptions(opts);
+        final FinishableOutputStream wrapped = new FinishableWrapperOutputStream(out);
         return options.getOutputStream(wrapped);
     }
 
     @Override
     byte[] getOptionsAsProperties(final Object opts) {
-        int dictSize = getDictSize(opts);
-        int lead = Integer.numberOfLeadingZeros(dictSize);
-        int secondBit = (dictSize >>> (30 - lead)) - 2;
+        final int dictSize = getDictSize(opts);
+        final int lead = Integer.numberOfLeadingZeros(dictSize);
+        final int secondBit = (dictSize >>> (30 - lead)) - 2;
         return new byte[] {
             (byte) ((19 - lead) * 2 + secondBit)
         };
@@ -90,7 +90,7 @@ class LZMA2Decoder extends CoderBase {
         if (opts instanceof LZMA2Options) {
             return (LZMA2Options) opts;
         }
-        LZMA2Options options = new LZMA2Options();
+        final LZMA2Options options = new LZMA2Options();
         options.setDictSize(numberOptionOrDefault(opts));
         return options;
     }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java
----------------------------------------------------------------------
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 5764ec7..098e306 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
@@ -455,8 +455,8 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      */
     public void setContentMethods(final Iterable<? extends SevenZMethodConfiguration> methods) {
         if (methods != null) {
-            LinkedList<SevenZMethodConfiguration> l = new LinkedList<SevenZMethodConfiguration>();
-            for (SevenZMethodConfiguration m : methods) {
+            final LinkedList<SevenZMethodConfiguration> l = new LinkedList<SevenZMethodConfiguration>();
+            for (final SevenZMethodConfiguration m : methods) {
                 l.addLast(m);
             }
             contentMethods = Collections.unmodifiableList(l);

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
----------------------------------------------------------------------
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 91017bc..a6aabe6 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
@@ -510,7 +510,7 @@ public class SevenZFile implements Closeable {
         long totalOutStreams = 0;
         for (int i = 0; i < coders.length; i++) {
             coders[i] = new Coder();
-            int bits = header.readUnsignedByte();
+            final int bits = header.readUnsignedByte();
             final int idSize = bits & 0xf;
             final boolean isSimple = (bits & 0x10) == 0;
             final boolean hasAttributes = (bits & 0x20) != 0;
@@ -623,7 +623,7 @@ public class SevenZFile implements Closeable {
             if (propertyType == 0) {
                 break;
             }
-            long size = readUint64(header);
+            final long size = readUint64(header);
             switch (propertyType) {
                 case NID.kEmptyStream: {
                     isEmptyStream = readBits(header, files.length);
@@ -868,12 +868,12 @@ public class SevenZFile implements Closeable {
             new BufferedInputStream(
               new BoundedRandomAccessFileInputStream(file,
                   archive.packSizes[firstPackStreamIndex]));
-        LinkedList<SevenZMethodConfiguration> methods = new LinkedList<SevenZMethodConfiguration>();
+        final LinkedList<SevenZMethodConfiguration> methods = new LinkedList<SevenZMethodConfiguration>();
         for (final Coder coder : folder.getOrderedCoders()) {
             if (coder.numInStreams != 1 || coder.numOutStreams != 1) {
                 throw new IOException("Multi input/output stream coders are not yet supported");
             }
-            SevenZMethod method = SevenZMethod.byId(coder.decompressionMethodId);
+            final SevenZMethod method = SevenZMethod.byId(coder.decompressionMethodId);
             inputStreamStack = Coders.addDecoder(fileName, inputStreamStack,
                     folder.getUnpackSizeForCoder(coder), coder, password);
             methods.addFirst(new SevenZMethodConfiguration(method,
@@ -907,7 +907,7 @@ public class SevenZFile implements Closeable {
             // In solid compression mode we need to decompress all leading folder'
             // streams to get access to an entry. We defer this until really needed
             // so that entire blocks can be skipped without wasting time for decompression.
-            InputStream stream = deferredBlockStreams.remove(0);
+            final InputStream stream = deferredBlockStreams.remove(0);
             IOUtils.skip(stream, Long.MAX_VALUE);
             stream.close();
         }
@@ -943,14 +943,14 @@ public class SevenZFile implements Closeable {
     
     private static long readUint64(final DataInput in) throws IOException {
         // long rather than int as it might get shifted beyond the range of an int
-        long firstByte = in.readUnsignedByte();
+        final long firstByte = in.readUnsignedByte();
         int mask = 0x80;
         long value = 0;
         for (int i = 0; i < 8; i++) {
             if ((firstByte & mask) == 0) {
                 return value | ((firstByte & (mask - 1)) << (8 * i));
             }
-            long nextByte = in.readUnsignedByte();
+            final long nextByte = in.readUnsignedByte();
             value |= nextByte << (8 * i);
             mask >>>= 1;
         }
@@ -986,7 +986,7 @@ public class SevenZFile implements Closeable {
         }
         long skipped = 0;
         while (bytesToSkip > Integer.MAX_VALUE) {
-            long skippedNow = skipBytesFully(input, Integer.MAX_VALUE);
+            final long skippedNow = skipBytesFully(input, Integer.MAX_VALUE);
             if (skippedNow == 0) {
                 return skipped;
             }
@@ -994,7 +994,7 @@ public class SevenZFile implements Closeable {
             bytesToSkip -= skippedNow;
         }
         while (bytesToSkip > 0) {
-            int skippedNow = input.skipBytes((int) bytesToSkip);
+            final int skippedNow = input.skipBytes((int) bytesToSkip);
             if (skippedNow == 0) {
                 return skipped;
             }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethod.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethod.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethod.java
index 4092cee..25a2e24 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethod.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethod.java
@@ -92,13 +92,13 @@ public enum SevenZMethod {
     }
 
     byte[] getId() {
-        byte[] copy = new byte[id.length];
+        final byte[] copy = new byte[id.length];
         System.arraycopy(id, 0, copy, 0, id.length);
         return copy;
     }
 
     static SevenZMethod byId(final byte[] id) {
-        for (SevenZMethod m : SevenZMethod.class.getEnumConstants()) {
+        for (final SevenZMethod m : SevenZMethod.class.getEnumConstants()) {
             if (Arrays.equals(m.id, id)) {
                 return m;
             }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3f2c760a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java
----------------------------------------------------------------------
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 9b23326..bbd5549 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
@@ -166,7 +166,7 @@ public class SevenZOutputFile implements Closeable {
             entry.setCompressedCrcValue(compressedCrc32.getValue());
             entry.setHasCrc(true);
             if (additionalCountingStreams != null) {
-                long[] sizes = new long[additionalCountingStreams.length];
+                final long[] sizes = new long[additionalCountingStreams.length];
                 for (int i = 0; i < additionalCountingStreams.length; i++) {
                     sizes[i] = additionalCountingStreams[i].getBytesWritten();
                 }
@@ -280,11 +280,11 @@ public class SevenZOutputFile implements Closeable {
         }
 
         OutputStream out = new OutputStreamWrapper();
-        ArrayList<CountingOutputStream> moreStreams = new ArrayList<CountingOutputStream>();
+        final ArrayList<CountingOutputStream> moreStreams = new ArrayList<CountingOutputStream>();
         boolean first = true;
-        for (SevenZMethodConfiguration m : getContentMethods(files.get(files.size() - 1))) {
+        for (final SevenZMethodConfiguration m : getContentMethods(files.get(files.size() - 1))) {
             if (!first) {
-                CountingOutputStream cos = new CountingOutputStream(out);
+                final CountingOutputStream cos = new CountingOutputStream(out);
                 moreStreams.add(cos);
                 out = cos;
             }
@@ -317,7 +317,7 @@ public class SevenZOutputFile implements Closeable {
     }
 
     private Iterable<? extends SevenZMethodConfiguration> getContentMethods(final SevenZArchiveEntry entry) {
-        Iterable<? extends SevenZMethodConfiguration> ms = entry.getContentMethods();
+        final Iterable<? extends SevenZMethodConfiguration> ms = entry.getContentMethods();
         return ms == null ? contentMethods : ms;
     }
 
@@ -371,7 +371,7 @@ public class SevenZOutputFile implements Closeable {
         header.write(NID.kFolder);
         writeUint64(header, numNonEmptyStreams);
         header.write(0);
-        for (SevenZArchiveEntry entry : files) {
+        for (final SevenZArchiveEntry entry : files) {
             if (entry.hasStream()) {
                 writeFolder(header, entry);
             }
@@ -380,9 +380,9 @@ public class SevenZOutputFile implements Closeable {
         header.write(NID.kCodersUnpackSize);
         for (final SevenZArchiveEntry entry : files) {
             if (entry.hasStream()) {
-                long[] moreSizes = additionalSizes.get(entry);
+                final long[] moreSizes = additionalSizes.get(entry);
                 if (moreSizes != null) {
-                    for (long s : moreSizes) {
+                    for (final long s : moreSizes) {
                         writeUint64(header, s);
                     }
                 }
@@ -402,9 +402,9 @@ public class SevenZOutputFile implements Closeable {
     }
     
     private void writeFolder(final DataOutput header, final SevenZArchiveEntry entry) throws IOException {
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        final ByteArrayOutputStream bos = new ByteArrayOutputStream();
         int numCoders = 0;
-        for (SevenZMethodConfiguration m : getContentMethods(entry)) {
+        for (final SevenZMethodConfiguration m : getContentMethods(entry)) {
             numCoders++;
             writeSingleCodec(m, bos);
         }
@@ -418,8 +418,8 @@ public class SevenZOutputFile implements Closeable {
     }
 
     private void writeSingleCodec(final SevenZMethodConfiguration m, final OutputStream bos) throws IOException {
-        byte[] id = m.getMethod().getId();
-        byte[] properties = Coders.findByMethod(m.getMethod())
+        final byte[] id = m.getMethod().getId();
+        final byte[] properties = Coders.findByMethod(m.getMethod())
             .getOptionsAsProperties(m.getOptions());
 
         int codecFlags = id.length;
@@ -493,9 +493,9 @@ public class SevenZOutputFile implements Closeable {
         boolean hasEmptyFiles = false;
         int emptyStreamCounter = 0;
         final BitSet emptyFiles = new BitSet(0);
-        for (SevenZArchiveEntry file1 : files) {
+        for (final SevenZArchiveEntry file1 : files) {
             if (!file1.hasStream()) {
-                boolean isDir = file1.isDirectory();
+                final boolean isDir = file1.isDirectory();
                 emptyFiles.set(emptyStreamCounter++, !isDir);
                 hasEmptyFiles |= !isDir;
             }
@@ -516,9 +516,9 @@ public class SevenZOutputFile implements Closeable {
         boolean hasAntiItems = false;
         final BitSet antiItems = new BitSet(0);
         int antiItemCounter = 0;
-        for (SevenZArchiveEntry file1 : files) {
+        for (final SevenZArchiveEntry file1 : files) {
             if (!file1.hasStream()) {
-                boolean isAnti = file1.isAntiItem();
+                final boolean isAnti = file1.isAntiItem();
                 antiItems.set(antiItemCounter++, isAnti);
                 hasAntiItems |= isAnti;
             }
@@ -730,8 +730,8 @@ public class SevenZOutputFile implements Closeable {
     }
 
     private static <T> Iterable<T> reverse(final Iterable<T> i) {
-        LinkedList<T> l = new LinkedList<T>();
-        for (T t : i) {
+        final LinkedList<T> l = new LinkedList<T>();
+        for (final T t : i) {
             l.addFirst(t);
         }
         return l;


Mime
View raw message