commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject [33/46] commons-compress git commit: Add final modifier to method parameters.
Date Sun, 10 Apr 2016 04:18:49 GMT
http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/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 d3ffe31..72dade4 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
@@ -32,8 +32,8 @@ class LZMA2Decoder extends CoderBase {
     }
 
     @Override
-    InputStream decode(final String archiveName, final InputStream in, long uncompressedLength,
-            final Coder coder, byte[] password) throws IOException {
+    InputStream decode(final String archiveName, final InputStream in, final long uncompressedLength,
+            final Coder coder, final byte[] password) throws IOException {
         try {
             int dictionarySize = getDictionarySize(coder);
             return new LZMA2InputStream(in, dictionarySize);
@@ -51,7 +51,7 @@ class LZMA2Decoder extends CoderBase {
     }
 
     @Override
-    byte[] getOptionsAsProperties(Object opts) {
+    byte[] getOptionsAsProperties(final Object opts) {
         int dictSize = getDictSize(opts);
         int lead = Integer.numberOfLeadingZeros(dictSize);
         int secondBit = (dictSize >>> (30 - lead)) - 2;
@@ -61,18 +61,18 @@ class LZMA2Decoder extends CoderBase {
     }
 
     @Override
-    Object getOptionsFromCoder(Coder coder, InputStream in) {
+    Object getOptionsFromCoder(final Coder coder, final InputStream in) {
         return getDictionarySize(coder);
     }
 
-    private int getDictSize(Object opts) {
+    private int getDictSize(final Object opts) {
         if (opts instanceof LZMA2Options) {
             return ((LZMA2Options) opts).getDictSize();
         }
         return numberOptionOrDefault(opts);
     }
 
-    private int getDictionarySize(Coder coder) throws IllegalArgumentException {
+    private int getDictionarySize(final Coder coder) throws IllegalArgumentException {
         final int dictionarySizeBits = 0xff & coder.properties[0];
         if ((dictionarySizeBits & (~0x3f)) != 0) {
             throw new IllegalArgumentException("Unsupported LZMA2 property bits");
@@ -86,7 +86,7 @@ class LZMA2Decoder extends CoderBase {
         return (2 | (dictionarySizeBits & 0x1)) << (dictionarySizeBits / 2 + 11);
     }
 
-    private LZMA2Options getOptions(Object opts) throws IOException {
+    private LZMA2Options getOptions(final Object opts) throws IOException {
         if (opts instanceof LZMA2Options) {
             return (LZMA2Options) opts;
         }
@@ -95,7 +95,7 @@ class LZMA2Decoder extends CoderBase {
         return options;
     }
 
-    private int numberOptionOrDefault(Object opts) {
+    private int numberOptionOrDefault(final Object opts) {
         return numberOptionOrDefault(opts, LZMA2Options.DICT_SIZE_DEFAULT);
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/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 c6317ce..5764ec7 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
@@ -67,7 +67,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      *
      * @param name This entry's new name.
      */
-    public void setName(String name) {
+    public void setName(final String name) {
         this.name = name;
     }
 
@@ -83,7 +83,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * Sets whether there is any content associated with this entry.
      * @param hasStream whether there is any content associated with this entry.
      */
-    public void setHasStream(boolean hasStream) {
+    public void setHasStream(final boolean hasStream) {
         this.hasStream = hasStream;
     }
 
@@ -102,7 +102,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      *
      * @param isDirectory True if this entry is a directory.
      */
-    public void setDirectory(boolean isDirectory) {
+    public void setDirectory(final boolean isDirectory) {
         this.isDirectory = isDirectory;
     }
     
@@ -120,7 +120,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * meaning it should delete the same file from a previous backup.
      * @param isAntiItem true if it is an anti-item, false otherwise 
      */
-    public void setAntiItem(boolean isAntiItem) {
+    public void setAntiItem(final boolean isAntiItem) {
         this.isAntiItem = isAntiItem;
     }
 
@@ -136,7 +136,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * Sets whether this entry has got a creation date at all.
      * @param hasCreationDate whether the entry has got a creation date
      */
-    public void setHasCreationDate(boolean hasCreationDate) {
+    public void setHasCreationDate(final boolean hasCreationDate) {
         this.hasCreationDate = hasCreationDate;
     }
     
@@ -159,7 +159,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * since 1 January 1601)
      * @param ntfsCreationDate the creation date
      */
-    public void setCreationDate(long ntfsCreationDate) {
+    public void setCreationDate(final long ntfsCreationDate) {
         this.creationDate = ntfsCreationDate;
     }
     
@@ -167,7 +167,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * Sets the creation date,
      * @param creationDate the creation date
      */
-    public void setCreationDate(Date creationDate) {
+    public void setCreationDate(final Date creationDate) {
         hasCreationDate = creationDate != null;
         if (hasCreationDate) {
             this.creationDate = javaTimeToNtfsTime(creationDate);
@@ -187,7 +187,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * @param hasLastModifiedDate whether this entry has got a last
      * modified date at all
      */
-    public void setHasLastModifiedDate(boolean hasLastModifiedDate) {
+    public void setHasLastModifiedDate(final boolean hasLastModifiedDate) {
         this.hasLastModifiedDate = hasLastModifiedDate;
     }
 
@@ -211,7 +211,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * units since 1 January 1601)
      * @param ntfsLastModifiedDate the last modified date
      */
-    public void setLastModifiedDate(long ntfsLastModifiedDate) {
+    public void setLastModifiedDate(final long ntfsLastModifiedDate) {
         this.lastModifiedDate = ntfsLastModifiedDate;
     }
     
@@ -219,7 +219,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * Sets the last modified date,
      * @param lastModifiedDate the last modified date
      */
-    public void setLastModifiedDate(Date lastModifiedDate) {
+    public void setLastModifiedDate(final Date lastModifiedDate) {
         hasLastModifiedDate = lastModifiedDate != null;
         if (hasLastModifiedDate) {
             this.lastModifiedDate = javaTimeToNtfsTime(lastModifiedDate);
@@ -238,7 +238,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * Sets whether this entry has got an access date at all.
      * @param hasAcessDate whether this entry has got an access date at all.
      */
-    public void setHasAccessDate(boolean hasAcessDate) {
+    public void setHasAccessDate(final boolean hasAcessDate) {
         this.hasAccessDate = hasAcessDate;
     }
 
@@ -261,7 +261,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * since 1 January 1601)
      * @param ntfsAccessDate the access date
      */
-    public void setAccessDate(long ntfsAccessDate) {
+    public void setAccessDate(final long ntfsAccessDate) {
         this.accessDate = ntfsAccessDate;
     }
     
@@ -269,7 +269,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * Sets the access date,
      * @param accessDate the access date
      */
-    public void setAccessDate(Date accessDate) {
+    public void setAccessDate(final Date accessDate) {
         hasAccessDate = accessDate != null;
         if (hasAccessDate) {
             this.accessDate = javaTimeToNtfsTime(accessDate);
@@ -288,7 +288,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * Sets whether this entry has windows attributes.
      * @param hasWindowsAttributes whether this entry has windows attributes.
      */
-    public void setHasWindowsAttributes(boolean hasWindowsAttributes) {
+    public void setHasWindowsAttributes(final boolean hasWindowsAttributes) {
         this.hasWindowsAttributes = hasWindowsAttributes;
     }
 
@@ -304,7 +304,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * Sets the windows attributes.
      * @param windowsAttributes the windows attributes
      */
-    public void setWindowsAttributes(int windowsAttributes) {
+    public void setWindowsAttributes(final int windowsAttributes) {
         this.windowsAttributes = windowsAttributes;
     }
 
@@ -322,7 +322,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * Sets whether this entry has got a crc.
      * @param hasCrc whether this entry has got a crc.
      */
-    public void setHasCrc(boolean hasCrc) {
+    public void setHasCrc(final boolean hasCrc) {
         this.hasCrc = hasCrc;
     }
 
@@ -342,7 +342,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * @param crc the CRC
      */
     @Deprecated
-    public void setCrc(int crc) {
+    public void setCrc(final int crc) {
         this.crc = crc;
     }
 
@@ -360,7 +360,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * @since Compress 1.7
      * @param crc the CRC
      */
-    public void setCrcValue(long crc) {
+    public void setCrcValue(final long crc) {
         this.crc = crc;
     }
 
@@ -380,7 +380,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * @param crc the CRC
      */
     @Deprecated
-    void setCompressedCrc(int crc) {
+    void setCompressedCrc(final int crc) {
         this.compressedCrc = crc;
     }
 
@@ -398,7 +398,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * @since Compress 1.7
      * @param crc the CRC
      */
-    void setCompressedCrcValue(long crc) {
+    void setCompressedCrcValue(final long crc) {
         this.compressedCrc = crc;
     }
 
@@ -417,7 +417,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      *
      * @param size This entry's new file size.
      */
-    public void setSize(long size) {
+    public void setSize(final long size) {
         this.size = size;
     }
 
@@ -435,7 +435,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      *
      * @param size This entry's new compressed file size.
      */
-    void setCompressedSize(long size) {
+    void setCompressedSize(final long size) {
         this.compressedSize = size;
     }
 
@@ -453,7 +453,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
      * @param methods the methods to use for the content
      * @since 1.8
      */
-    public void setContentMethods(Iterable<? extends SevenZMethodConfiguration> methods) {
+    public void setContentMethods(final Iterable<? extends SevenZMethodConfiguration> methods) {
         if (methods != null) {
             LinkedList<SevenZMethodConfiguration> l = new LinkedList<SevenZMethodConfiguration>();
             for (SevenZMethodConfiguration m : methods) {

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/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 ab6198e..91017bc 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
@@ -175,7 +175,7 @@ public class SevenZFile implements Closeable {
         return Arrays.asList(archive.files);
     }
     
-    private Archive readHeaders(byte[] password) throws IOException {
+    private Archive readHeaders(final byte[] password) throws IOException {
         final byte[] signature = new byte[6];
         file.readFully(signature);
         if (!Arrays.equals(signature, sevenZSignature)) {
@@ -283,7 +283,7 @@ public class SevenZFile implements Closeable {
     }
     
     private DataInputStream readEncodedHeader(final DataInputStream header, final Archive archive,
-                                              byte[] password) throws IOException {
+                                              final byte[] password) throws IOException {
         readStreamsInfo(header, archive);
         
         // FIXME: merge with buildDecodingStream()/buildDecoderStack() at some stage?
@@ -862,7 +862,7 @@ public class SevenZFile implements Closeable {
     }
 
     private InputStream buildDecoderStack(final Folder folder, final long folderOffset,
-                final int firstPackStreamIndex, SevenZArchiveEntry entry) throws IOException {
+                final int firstPackStreamIndex, final SevenZArchiveEntry entry) throws IOException {
         file.seek(folderOffset);
         InputStream inputStreamStack =
             new BufferedInputStream(
@@ -923,7 +923,7 @@ public class SevenZFile implements Closeable {
      * @throws IOException
      *             if an I/O error has occurred
      */
-    public int read(byte[] b) throws IOException {
+    public int read(final byte[] b) throws IOException {
         return read(b, 0, b.length);
     }
     
@@ -937,7 +937,7 @@ public class SevenZFile implements Closeable {
      * @throws IOException
      *             if an I/O error has occurred
      */
-    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 {
         return getCurrentStream().read(b, off, len);
     }
     
@@ -967,7 +967,7 @@ public class SevenZFile implements Closeable {
      * @return true, if this is the signature of a 7z archive.
      * @since 1.8
      */
-    public static boolean matches(byte[] signature, int length) {
+    public static boolean matches(final byte[] signature, final int length) {
         if (length < sevenZSignature.length) {
             return false;
         }
@@ -980,7 +980,7 @@ public class SevenZFile implements Closeable {
         return true;
     }
 
-    private static long skipBytesFully(DataInput input, long bytesToSkip) throws IOException {
+    private static long skipBytesFully(final DataInput input, long bytesToSkip) throws IOException {
         if (bytesToSkip < 1) {
             return 0;
         }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/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 43232ca..4092cee 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
@@ -87,7 +87,7 @@ public enum SevenZMethod {
 
     private final byte[] id;
 
-    private SevenZMethod(byte[] id) {
+    private SevenZMethod(final byte[] id) {
         this.id = id;
     }
 
@@ -97,7 +97,7 @@ public enum SevenZMethod {
         return copy;
     }
 
-    static SevenZMethod byId(byte[] id) {
+    static SevenZMethod byId(final byte[] id) {
         for (SevenZMethod m : SevenZMethod.class.getEnumConstants()) {
             if (Arrays.equals(m.id, id)) {
                 return m;

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethodConfiguration.java
----------------------------------------------------------------------
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 59aa2e4..bc47ee0 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
@@ -43,7 +43,7 @@ public class SevenZMethodConfiguration {
      * Doesn't configure any additional options.
      * @param method the method to use
      */
-    public SevenZMethodConfiguration(SevenZMethod method) {
+    public SevenZMethodConfiguration(final SevenZMethod method) {
         this(method, null);
     }
 
@@ -53,7 +53,7 @@ public class SevenZMethodConfiguration {
      * @param options the options to use
      * @throws IllegalArgumentException if the method doesn't understand the options specified.
      */
-    public SevenZMethodConfiguration(SevenZMethod method, Object options) {
+    public SevenZMethodConfiguration(final SevenZMethod method, final Object options) {
         this.method = method;
         this.options = options;
         if (options != null && !Coders.findByMethod(method).canAcceptOptions(options)) {

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/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 4e273a2..9b23326 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
@@ -79,7 +79,7 @@ public class SevenZOutputFile implements Closeable {
      * to {@link #setContentMethods}.</p>
      * @param method the default compression method
      */
-    public void setContentCompression(SevenZMethod method) {
+    public void setContentCompression(final SevenZMethod method) {
         setContentMethods(Collections.singletonList(new SevenZMethodConfiguration(method)));
     }
 
@@ -97,7 +97,7 @@ public class SevenZOutputFile implements Closeable {
      * @since 1.8
      * @param methods the default (compression) methods
      */
-    public void setContentMethods(Iterable<? extends SevenZMethodConfiguration> methods) {
+    public void setContentMethods(final Iterable<? extends SevenZMethodConfiguration> methods) {
         this.contentMethods = reverse(methods);
     }
 
@@ -316,7 +316,7 @@ public class SevenZOutputFile implements Closeable {
         };
     }
 
-    private Iterable<? extends SevenZMethodConfiguration> getContentMethods(SevenZArchiveEntry entry) {
+    private Iterable<? extends SevenZMethodConfiguration> getContentMethods(final SevenZArchiveEntry entry) {
         Iterable<? extends SevenZMethodConfiguration> ms = entry.getContentMethods();
         return ms == null ? contentMethods : ms;
     }
@@ -401,7 +401,7 @@ public class SevenZOutputFile implements Closeable {
         header.write(NID.kEnd);
     }
     
-    private void writeFolder(final DataOutput header, SevenZArchiveEntry entry) throws IOException {
+    private void writeFolder(final DataOutput header, final SevenZArchiveEntry entry) throws IOException {
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         int numCoders = 0;
         for (SevenZMethodConfiguration m : getContentMethods(entry)) {
@@ -417,7 +417,7 @@ public class SevenZOutputFile implements Closeable {
         }
     }
 
-    private void writeSingleCodec(SevenZMethodConfiguration m, OutputStream bos) throws IOException {
+    private void writeSingleCodec(final SevenZMethodConfiguration m, final OutputStream bos) throws IOException {
         byte[] id = m.getMethod().getId();
         byte[] properties = Coders.findByMethod(m.getMethod())
             .getOptionsAsProperties(m.getOptions());
@@ -729,7 +729,7 @@ public class SevenZOutputFile implements Closeable {
         }
     }
 
-    private static <T> Iterable<T> reverse(Iterable<T> i) {
+    private static <T> Iterable<T> reverse(final Iterable<T> i) {
         LinkedList<T> l = new LinkedList<T>();
         for (T t : i) {
             l.addFirst(t);

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
----------------------------------------------------------------------
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 00a3edd..0e4fa50 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
@@ -239,7 +239,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      *
      * @param name the entry name
      */
-    public TarArchiveEntry(String name) {
+    public TarArchiveEntry(final String name) {
         this(name, false);
     }
 
@@ -253,7 +253,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      *
      * @since 1.1
      */
-    public TarArchiveEntry(String name, boolean preserveLeadingSlashes) {
+    public TarArchiveEntry(String name, final boolean preserveLeadingSlashes) {
         this();
 
         this.preserveLeadingSlashes = preserveLeadingSlashes;
@@ -274,7 +274,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @param name the entry name
      * @param linkFlag the entry link flag.
      */
-    public TarArchiveEntry(String name, byte linkFlag) {
+    public TarArchiveEntry(final String name, final byte linkFlag) {
         this(name, linkFlag, false);
     }
 
@@ -288,7 +288,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      *
      * @since 1.5
      */
-    public TarArchiveEntry(String name, byte linkFlag, boolean preserveLeadingSlashes) {
+    public TarArchiveEntry(final String name, final byte linkFlag, final boolean preserveLeadingSlashes) {
         this(name, preserveLeadingSlashes);
         this.linkFlag = linkFlag;
         if (linkFlag == LF_GNUTYPE_LONGNAME) {
@@ -304,7 +304,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      *
      * @param file The file that the entry represents.
      */
-    public TarArchiveEntry(File file) {
+    public TarArchiveEntry(final File file) {
         this(file, file.getPath());
     }
 
@@ -315,7 +315,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @param file The file that the entry represents.
      * @param fileName the name to be used for the entry.
      */
-    public TarArchiveEntry(File file, String fileName) {
+    public TarArchiveEntry(final File file, final String fileName) {
         String normalizedName = normalizeFileName(fileName, false);
         this.file = file;
 
@@ -347,7 +347,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @param headerBuf The header bytes from a tar archive entry.
      * @throws IllegalArgumentException if any of the numeric fields have an invalid format
      */
-    public TarArchiveEntry(byte[] headerBuf) {
+    public TarArchiveEntry(final byte[] headerBuf) {
         this();
         parseTarHeader(headerBuf);
     }
@@ -362,7 +362,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @throws IllegalArgumentException if any of the numeric fields have an invalid format
      * @throws IOException on error
      */
-    public TarArchiveEntry(byte[] headerBuf, ZipEncoding encoding)
+    public TarArchiveEntry(final byte[] headerBuf, final ZipEncoding encoding)
         throws IOException {
         this();
         parseTarHeader(headerBuf, encoding);
@@ -375,7 +375,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @param it Entry to be checked for equality.
      * @return True if the entries are equal.
      */
-    public boolean equals(TarArchiveEntry it) {
+    public boolean equals(final TarArchiveEntry it) {
         return getName().equals(it.getName());
     }
 
@@ -387,7 +387,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @return True if the entries are equal.
      */
     @Override
-    public boolean equals(Object it) {
+    public boolean equals(final Object it) {
         if (it == null || getClass() != it.getClass()) {
             return false;
         }
@@ -412,7 +412,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @param desc Entry to be checked as a descendent of this.
      * @return True if entry is a descendant of this.
      */
-    public boolean isDescendent(TarArchiveEntry desc) {
+    public boolean isDescendent(final TarArchiveEntry desc) {
         return desc.getName().startsWith(getName());
     }
 
@@ -431,7 +431,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      *
      * @param name This entry's new name.
      */
-    public void setName(String name) {
+    public void setName(final String name) {
         this.name = normalizeFileName(name, this.preserveLeadingSlashes);
     }
 
@@ -440,7 +440,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      *
      * @param mode the mode for this entry
      */
-    public void setMode(int mode) {
+    public void setMode(final int mode) {
         this.mode = mode;
     }
 
@@ -460,7 +460,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      *
      * @since 1.1
      */
-    public void setLinkName(String link) {
+    public void setLinkName(final String link) {
         this.linkName = link;
     }
 
@@ -481,7 +481,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      *
      * @param userId This entry's new user id.
      */
-    public void setUserId(int userId) {
+    public void setUserId(final int userId) {
         setUserId((long) userId);
     }
 
@@ -501,7 +501,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @param userId This entry's new user id.
      * @since 1.10
      */
-    public void setUserId(long userId) {
+    public void setUserId(final long userId) {
         this.userId = userId;
     }
 
@@ -522,7 +522,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      *
      * @param groupId This entry's new group id.
      */
-    public void setGroupId(int groupId) {
+    public void setGroupId(final int groupId) {
         setGroupId((long) groupId);
     }
 
@@ -542,7 +542,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @since 1.10
      * @param groupId This entry's new group id.
      */
-    public void setGroupId(long groupId) {
+    public void setGroupId(final long groupId) {
         this.groupId = groupId;
     }
 
@@ -560,7 +560,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      *
      * @param userName This entry's new user name.
      */
-    public void setUserName(String userName) {
+    public void setUserName(final String userName) {
         this.userName = userName;
     }
 
@@ -578,7 +578,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      *
      * @param groupName This entry's new group name.
      */
-    public void setGroupName(String groupName) {
+    public void setGroupName(final String groupName) {
         this.groupName = groupName;
     }
 
@@ -588,7 +588,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @param userId This entry's new user id.
      * @param groupId This entry's new group id.
      */
-    public void setIds(int userId, int groupId) {
+    public void setIds(final int userId, final int groupId) {
         setUserId(userId);
         setGroupId(groupId);
     }
@@ -599,7 +599,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @param userName This entry's new user name.
      * @param groupName This entry's new group name.
      */
-    public void setNames(String userName, String groupName) {
+    public void setNames(final String userName, final String groupName) {
         setUserName(userName);
         setGroupName(groupName);
     }
@@ -610,7 +610,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      *
      * @param time This entry's new modification time.
      */
-    public void setModTime(long time) {
+    public void setModTime(final long time) {
         modTime = time / MILLIS_PER_SECOND;
     }
 
@@ -619,7 +619,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      *
      * @param time This entry's new modification time.
      */
-    public void setModTime(Date time) {
+    public void setModTime(final Date time) {
         modTime = time.getTime() / MILLIS_PER_SECOND;
     }
 
@@ -682,7 +682,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @param size This entry's new file size.
      * @throws IllegalArgumentException if the size is &lt; 0.
      */
-    public void setSize(long size) {
+    public void setSize(final long size) {
         if (size < 0){
             throw new IllegalArgumentException("Size is out of range: "+size);
         }
@@ -706,7 +706,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @throws IllegalArgumentException if the devNo is &lt; 0.
      * @since 1.4
      */
-    public void setDevMajor(int devNo) {
+    public void setDevMajor(final int devNo) {
         if (devNo < 0){
             throw new IllegalArgumentException("Major device number is out of "
                                                + "range: " + devNo);
@@ -731,7 +731,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @throws IllegalArgumentException if the devNo is &lt; 0.
      * @since 1.4
      */
-    public void setDevMinor(int devNo) {
+    public void setDevMinor(final int devNo) {
         if (devNo < 0){
             throw new IllegalArgumentException("Minor device number is out of "
                                                + "range: " + devNo);
@@ -970,7 +970,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      *
      * @param outbuf The tar entry header buffer to fill in.
      */
-    public void writeEntryHeader(byte[] outbuf) {
+    public void writeEntryHeader(final byte[] outbuf) {
         try {
             writeEntryHeader(outbuf, TarUtils.DEFAULT_ENCODING, false);
         } catch (IOException ex) {
@@ -994,8 +994,8 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @since 1.4
      * @throws IOException on error
      */
-    public void writeEntryHeader(byte[] outbuf, ZipEncoding encoding,
-                                 boolean starMode) throws IOException {
+    public void writeEntryHeader(final byte[] outbuf, final ZipEncoding encoding,
+                                 final boolean starMode) throws IOException {
         int offset = 0;
 
         offset = TarUtils.formatNameBytes(name, outbuf, offset, NAMELEN,
@@ -1038,8 +1038,8 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
         TarUtils.formatCheckSumOctalBytes(chk, outbuf, csOffset, CHKSUMLEN);
     }
 
-    private int writeEntryHeaderField(long value, byte[] outbuf, int offset,
-                                      int length, boolean starMode) {
+    private int writeEntryHeaderField(final long value, final byte[] outbuf, final int offset,
+                                      final int length, final boolean starMode) {
         if (!starMode && (value < 0
                           || value >= 1l << 3 * (length - 1))) {
             // value doesn't fit into field when written as octal
@@ -1057,7 +1057,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @param header The tar entry header buffer to get information from.
      * @throws IllegalArgumentException if any of the numeric fields have an invalid format
      */
-    public void parseTarHeader(byte[] header) {
+    public void parseTarHeader(final byte[] header) {
         try {
             parseTarHeader(header, TarUtils.DEFAULT_ENCODING);
         } catch (IOException ex) {
@@ -1080,12 +1080,12 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * have an invalid format
      * @throws IOException on error
      */
-    public void parseTarHeader(byte[] header, ZipEncoding encoding)
+    public void parseTarHeader(final byte[] header, final ZipEncoding encoding)
         throws IOException {
         parseTarHeader(header, encoding, false);
     }
 
-    private void parseTarHeader(byte[] header, ZipEncoding encoding,
+    private void parseTarHeader(final byte[] header, final ZipEncoding encoding,
                                 final boolean oldStyle)
         throws IOException {
         int offset = 0;
@@ -1170,7 +1170,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * turns path separators into forward slahes.
      */
     private static String normalizeFileName(String fileName,
-                                            boolean preserveLeadingSlashes) {
+                                            final boolean preserveLeadingSlashes) {
         String osname = System.getProperty("os.name").toLowerCase(Locale.ENGLISH);
 
         if (osname != null) {
@@ -1214,7 +1214,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
      * @param header The tar entry header buffer to evaluate the format for.
      * @return format type
      */
-    private int evaluateType(byte[] header) {
+    private int evaluateType(final byte[] header) {
         if (ArchiveUtils.matchAsciiBuffer(MAGIC_GNU, header, MAGIC_OFFSET, MAGICLEN)) {
             return FORMAT_OLDGNU;
         }
@@ -1228,7 +1228,7 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
         return 0;
     }
 
-    void fillGNUSparse0xData(Map<String, String> headers) {
+    void fillGNUSparse0xData(final Map<String, String> headers) {
         paxGNUSparse = true;
         realSize = Integer.parseInt(headers.get("GNU.sparse.size"));
         if (headers.containsKey("GNU.sparse.name")) {
@@ -1237,13 +1237,13 @@ public class TarArchiveEntry implements TarConstants, ArchiveEntry {
         }
     }
 
-    void fillGNUSparse1xData(Map<String, String> headers) {
+    void fillGNUSparse1xData(final Map<String, String> headers) {
         paxGNUSparse = true;
         realSize = Integer.parseInt(headers.get("GNU.sparse.realsize"));
         name = headers.get("GNU.sparse.name");
     }
 
-    void fillStarSparseData(Map<String, String> headers) {
+    void fillStarSparseData(final Map<String, String> headers) {
         starSparse = true;
         if (headers.containsKey("SCHILY.realsize")) {
             realSize = Long.parseLong(headers.get("SCHILY.realsize"));

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
----------------------------------------------------------------------
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 8b47bba..8e0159e 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
@@ -85,7 +85,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * Constructor for TarInputStream.
      * @param is the input stream to use
      */
-    public TarArchiveInputStream(InputStream is) {
+    public TarArchiveInputStream(final InputStream is) {
         this(is, TarConstants.DEFAULT_BLKSIZE, TarConstants.DEFAULT_RCDSIZE);
     }
 
@@ -95,7 +95,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * @param encoding name of the encoding to use for file names
      * @since 1.4
      */
-    public TarArchiveInputStream(InputStream is, String encoding) {
+    public TarArchiveInputStream(final InputStream is, final String encoding) {
         this(is, TarConstants.DEFAULT_BLKSIZE, TarConstants.DEFAULT_RCDSIZE,
              encoding);
     }
@@ -105,7 +105,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * @param is the input stream to use
      * @param blockSize the block size to use
      */
-    public TarArchiveInputStream(InputStream is, int blockSize) {
+    public TarArchiveInputStream(final InputStream is, final int blockSize) {
         this(is, blockSize, TarConstants.DEFAULT_RCDSIZE);
     }
 
@@ -116,8 +116,8 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * @param encoding name of the encoding to use for file names
      * @since 1.4
      */
-    public TarArchiveInputStream(InputStream is, int blockSize,
-                                 String encoding) {
+    public TarArchiveInputStream(final InputStream is, final int blockSize,
+                                 final String encoding) {
         this(is, blockSize, TarConstants.DEFAULT_RCDSIZE, encoding);
     }
 
@@ -127,7 +127,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * @param blockSize the block size to use
      * @param recordSize the record size to use
      */
-    public TarArchiveInputStream(InputStream is, int blockSize, int recordSize) {
+    public TarArchiveInputStream(final InputStream is, final int blockSize, final int recordSize) {
         this(is, blockSize, recordSize, null);      
     }
 
@@ -139,8 +139,8 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * @param encoding name of the encoding to use for file names
      * @since 1.4
      */
-    public TarArchiveInputStream(InputStream is, int blockSize, int recordSize,
-                                 String encoding) {
+    public TarArchiveInputStream(final InputStream is, final int blockSize, final int recordSize,
+                                 final String encoding) {
         this.is = is;
         this.hasHitEOF = false;
         this.encoding = encoding;
@@ -236,7 +236,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * @param markLimit The limit to mark.
      */
     @Override
-    public void mark(int markLimit) {
+    public void mark(final int markLimit) {
     }
 
     /**
@@ -414,7 +414,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * @param record The record data to check.
      * @return true if the record data is an End of Archive
      */
-    protected boolean isEOFRecord(byte[] record) {
+    protected boolean isEOFRecord(final byte[] record) {
         return record == null || ArchiveUtils.isArrayZero(record, recordSize);
     }
     
@@ -451,7 +451,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
     // NOTE, using a Map here makes it impossible to ever support GNU
     // sparse files using the PAX Format 0.0, see
     // https://www.gnu.org/software/tar/manual/html_section/tar_92.html#SEC188
-    Map<String, String> parsePaxHeaders(InputStream i)
+    Map<String, String> parsePaxHeaders(final InputStream i)
         throws IOException {
         Map<String, String> headers = new HashMap<String, String>(globalPaxHeaders);
         // Format is "length keyword=value\n";
@@ -503,7 +503,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
         return headers;
     }
 
-    private void applyPaxHeadersToCurrentEntry(Map<String, String> headers) {
+    private void applyPaxHeadersToCurrentEntry(final Map<String, String> headers) {
         /*
          * The following headers are defined for Pax.
          * atime, ctime, charset: cannot use these without changing TarArchiveEntry fields
@@ -640,7 +640,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * @throws IOException on error
      */
     @Override
-    public int read(byte[] buf, int offset, int numToRead) throws IOException {
+    public int read(final byte[] buf, final int offset, int numToRead) throws IOException {
     	int totalRead = 0;
 
         if (hasHitEOF || isDirectory() || entryOffset >= entrySize) {
@@ -674,7 +674,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      * <p>May return false if the current entry is a sparse file.</p>
      */
     @Override
-    public boolean canReadEntryData(ArchiveEntry ae) {
+    public boolean canReadEntryData(final ArchiveEntry ae) {
         if (ae instanceof TarArchiveEntry) {
             TarArchiveEntry te = (TarArchiveEntry) ae;
             return !te.isSparse();
@@ -691,7 +691,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
         return currEntry;
     }
 
-    protected final void setCurrentEntry(TarArchiveEntry e) {
+    protected final void setCurrentEntry(final TarArchiveEntry e) {
         currEntry = e;
     }
 
@@ -699,7 +699,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
         return hasHitEOF;
     }
 
-    protected final void setAtEOF(boolean b) {
+    protected final void setAtEOF(final boolean b) {
         hasHitEOF = b;
     }
 
@@ -725,7 +725,7 @@ public class TarArchiveInputStream extends ArchiveInputStream {
      *            the number of bytes to check
      * @return true, if this stream is a tar archive stream, false otherwise
      */
-    public static boolean matches(byte[] signature, int length) {
+    public static boolean matches(final byte[] signature, final int length) {
         if (length < TarConstants.VERSION_OFFSET+TarConstants.VERSIONLEN) {
             return false;
         }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
----------------------------------------------------------------------
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 803f6d2..4702711 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
@@ -97,7 +97,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * Constructor for TarInputStream.
      * @param os the output stream to use
      */
-    public TarArchiveOutputStream(OutputStream os) {
+    public TarArchiveOutputStream(final OutputStream os) {
         this(os, TarConstants.DEFAULT_BLKSIZE, TarConstants.DEFAULT_RCDSIZE);
     }
 
@@ -107,7 +107,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * @param encoding name of the encoding to use for file names
      * @since 1.4
      */
-    public TarArchiveOutputStream(OutputStream os, String encoding) {
+    public TarArchiveOutputStream(final OutputStream os, final String encoding) {
         this(os, TarConstants.DEFAULT_BLKSIZE, TarConstants.DEFAULT_RCDSIZE, encoding);
     }
 
@@ -116,7 +116,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * @param os the output stream to use
      * @param blockSize the block size to use
      */
-    public TarArchiveOutputStream(OutputStream os, int blockSize) {
+    public TarArchiveOutputStream(final OutputStream os, final int blockSize) {
         this(os, blockSize, TarConstants.DEFAULT_RCDSIZE);
     }
 
@@ -127,8 +127,8 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * @param encoding name of the encoding to use for file names
      * @since 1.4
      */
-    public TarArchiveOutputStream(OutputStream os, int blockSize,
-                                  String encoding) {
+    public TarArchiveOutputStream(final OutputStream os, final int blockSize,
+                                  final String encoding) {
         this(os, blockSize, TarConstants.DEFAULT_RCDSIZE, encoding);
     }
 
@@ -138,7 +138,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * @param blockSize the block size to use
      * @param recordSize the record size to use
      */
-    public TarArchiveOutputStream(OutputStream os, int blockSize, int recordSize) {
+    public TarArchiveOutputStream(final OutputStream os, final int blockSize, final int recordSize) {
         this(os, blockSize, recordSize, null);
     }
 
@@ -150,8 +150,8 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * @param encoding name of the encoding to use for file names
      * @since 1.4
      */
-    public TarArchiveOutputStream(OutputStream os, int blockSize,
-                                  int recordSize, String encoding) {
+    public TarArchiveOutputStream(final OutputStream os, final int blockSize,
+                                  final int recordSize, final String encoding) {
         out = new CountingOutputStream(os);
         this.encoding = encoding;
         this.zipEncoding = ZipEncodingHelper.getZipEncoding(encoding);
@@ -170,7 +170,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * Default is LONGFILE_ERROR.
      * @param longFileMode the mode to use
      */
-    public void setLongFileMode(int longFileMode) {
+    public void setLongFileMode(final int longFileMode) {
         this.longFileMode = longFileMode;
     }
 
@@ -182,7 +182,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * @param bigNumberMode the mode to use
      * @since 1.4
      */
-    public void setBigNumberMode(int bigNumberMode) {
+    public void setBigNumberMode(final int bigNumberMode) {
         this.bigNumberMode = bigNumberMode;
     }
 
@@ -191,7 +191,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * @since 1.4
      * @param b whether to add a PAX extension header for non-ASCII file names.
      */
-    public void setAddPaxHeadersForNonAsciiNames(boolean b) {
+    public void setAddPaxHeadersForNonAsciiNames(final boolean b) {
         addPaxHeadersForNonAsciiNames = b;
     }
 
@@ -270,7 +270,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * @throws ClassCastException if archiveEntry is not an instance of TarArchiveEntry
      */
     @Override
-    public void putArchiveEntry(ArchiveEntry archiveEntry) throws IOException {
+    public void putArchiveEntry(final ArchiveEntry archiveEntry) throws IOException {
         if (finished) {
             throw new IOException("Stream has already been finished");
         }
@@ -374,7 +374,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * @throws IOException on error
      */
     @Override
-    public void write(byte[] wBuf, int wOffset, int numToWrite) throws IOException {
+    public void write(final byte[] wBuf, int wOffset, int numToWrite) throws IOException {
         if (!haveUnclosedEntry) {
             throw new IllegalStateException("No current tar entry");
         }
@@ -446,9 +446,9 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * Writes a PAX extended header with the given map as contents.
      * @since 1.4
      */
-    void writePaxHeaders(TarArchiveEntry entry,
-                         String entryName,
-                         Map<String, String> headers) throws IOException {
+    void writePaxHeaders(final TarArchiveEntry entry,
+                         final String entryName,
+                         final Map<String, String> headers) throws IOException {
         String name = "./PaxHeaders.X/" + stripTo7Bits(entryName);
         if (name.length() >= TarConstants.NAMELEN) {
             name = name.substring(0, TarConstants.NAMELEN - 1);
@@ -485,7 +485,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
         closeArchiveEntry();
     }
 
-    private String stripTo7Bits(String name) {
+    private String stripTo7Bits(final String name) {
         final int length = name.length();
         StringBuilder result = new StringBuilder(length);
         for (int i = 0; i < length; i++) {
@@ -503,7 +503,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * @return true if the character could lead to problems when used
      * inside a TarArchiveEntry name for a PAX header.
      */
-    private boolean shouldBeReplaced(char c) {
+    private boolean shouldBeReplaced(final char c) {
         return c == 0 // would be read as Trailing null
             || c == '/' // when used as last character TAE will consider the PAX header a directory
             || c == '\\'; // same as '/' as slashes get "normalized" on Windows
@@ -524,7 +524,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
     }
 
     @Override
-    public ArchiveEntry createArchiveEntry(File inputFile, String entryName)
+    public ArchiveEntry createArchiveEntry(final File inputFile, final String entryName)
             throws IOException {
         if(finished) {
             throw new IOException("Stream has already been finished");
@@ -538,7 +538,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * @param record The record data to write to the archive.
      * @throws IOException on error
      */
-    private void writeRecord(byte[] record) throws IOException {
+    private void writeRecord(final byte[] record) throws IOException {
         if (record.length != recordSize) {
             throw new IOException("record to write has length '"
                                   + record.length
@@ -559,7 +559,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * @param offset The offset of the record data within buf.
      * @throws IOException on error
      */
-    private void writeRecord(byte[] buf, int offset) throws IOException {
+    private void writeRecord(final byte[] buf, final int offset) throws IOException {
  
         if (offset + recordSize > buf.length) {
             throw new IOException("record has length '" + buf.length
@@ -581,8 +581,8 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
         }
     }
 
-    private void addPaxHeadersForBigNumbers(Map<String, String> paxHeaders,
-                                            TarArchiveEntry entry) {
+    private void addPaxHeadersForBigNumbers(final Map<String, String> paxHeaders,
+                                            final TarArchiveEntry entry) {
         addPaxHeaderForBigNumber(paxHeaders, "size", entry.getSize(),
                                  TarConstants.MAXSIZE);
         addPaxHeaderForBigNumber(paxHeaders, "gid", entry.getLongGroupId(),
@@ -601,15 +601,15 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
         failForBigNumber("mode", entry.getMode(), TarConstants.MAXID);
     }
 
-    private void addPaxHeaderForBigNumber(Map<String, String> paxHeaders,
-                                          String header, long value,
-                                          long maxValue) {
+    private void addPaxHeaderForBigNumber(final Map<String, String> paxHeaders,
+                                          final String header, final long value,
+                                          final long maxValue) {
         if (value < 0 || value > maxValue) {
             paxHeaders.put(header, String.valueOf(value));
         }
     }
 
-    private void failForBigNumbers(TarArchiveEntry entry) {
+    private void failForBigNumbers(final TarArchiveEntry entry) {
         failForBigNumber("entry size", entry.getSize(), TarConstants.MAXSIZE);
         failForBigNumberWithPosixMessage("group id", entry.getLongGroupId(), TarConstants.MAXID);
         failForBigNumber("last modification time",
@@ -623,15 +623,15 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
                          TarConstants.MAXID);
     }
 
-    private void failForBigNumber(String field, long value, long maxValue) {
+    private void failForBigNumber(final String field, final long value, final long maxValue) {
         failForBigNumber(field, value, maxValue, "");
     }
 
-    private void failForBigNumberWithPosixMessage(String field, long value, long maxValue) {
+    private void failForBigNumberWithPosixMessage(final String field, final long value, final long maxValue) {
         failForBigNumber(field, value, maxValue, " Use STAR or POSIX extensions to overcome this limit");
     }
 
-    private void failForBigNumber(String field, long value, long maxValue, String additionalMsg) {
+    private void failForBigNumber(final String field, final long value, final long maxValue, final String additionalMsg) {
         if (value < 0 || value > maxValue) {
             throw new RuntimeException(field + " '" + value
                     + "' is too big ( > "
@@ -661,9 +661,9 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
      * @param fieldName the name of the field
      * @return whether a pax header has been written.
      */
-    private boolean handleLongName(TarArchiveEntry entry , String name,
-                                   Map<String, String> paxHeaders,
-                                   String paxHeaderName, byte linkType, String fieldName)
+    private boolean handleLongName(final TarArchiveEntry entry , final String name,
+                                   final Map<String, String> paxHeaders,
+                                   final String paxHeaderName, final byte linkType, final String fieldName)
         throws IOException {
         final ByteBuffer encodedName = zipEncoding.encode(name);
         final int len = encodedName.limit() - encodedName.position();
@@ -692,7 +692,7 @@ public class TarArchiveOutputStream extends ArchiveOutputStream {
         return false;
     }
 
-    private void transferModTime(TarArchiveEntry from, TarArchiveEntry to) {
+    private void transferModTime(final TarArchiveEntry from, final TarArchiveEntry to) {
         Date fromModTime = from.getModTime();
         long fromModTimeSeconds = fromModTime.getTime() / 1000;
         if (fromModTimeSeconds < 0 || fromModTimeSeconds > TarConstants.MAXSIZE) {

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseEntry.java
----------------------------------------------------------------------
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 79b36ac..a49e718 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
@@ -51,7 +51,7 @@ public class TarArchiveSparseEntry implements TarConstants {
      * @param headerBuf The header bytes from a tar archive entry.
      * @throws IOException on unknown format
      */
-    public TarArchiveSparseEntry(byte[] headerBuf) throws IOException {
+    public TarArchiveSparseEntry(final byte[] headerBuf) throws IOException {
         int offset = 0;
         offset += SPARSELEN_GNU_SPARSE;
         isExtended = TarUtils.parseBoolean(headerBuf, offset);

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
----------------------------------------------------------------------
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 ba850a5..1138fd1 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
@@ -46,10 +46,10 @@ public class TarUtils {
      */
     static final ZipEncoding FALLBACK_ENCODING = new ZipEncoding() {
             @Override
-            public boolean canEncode(String name) { return true; }
+            public boolean canEncode(final String name) { return true; }
 
             @Override
-            public ByteBuffer encode(String name) {
+            public ByteBuffer encode(final String name) {
                 final int length = name.length();
                 byte[] buf = new byte[length];
 
@@ -61,7 +61,7 @@ public class TarUtils {
             }
 
             @Override
-            public String decode(byte[] buffer) {
+            public String decode(final byte[] buffer) {
                 final int length = buffer.length;
                 StringBuilder result = new StringBuilder(length);
 
@@ -233,8 +233,8 @@ public class TarUtils {
     }
 
     // Helper method to generate the exception message
-    private static String exceptionMessage(byte[] buffer, final int offset,
-            final int length, int current, final byte currentByte) {
+    private static String exceptionMessage(final byte[] buffer, final int offset,
+            final int length, final int current, final byte currentByte) {
         // default charset is good enough for an exception message,
         //
         // the alternative was to modify parseOctal and
@@ -259,7 +259,7 @@ public class TarUtils {
      * @param length The maximum number of bytes to parse.
      * @return The entry name.
      */
-    public static String parseName(byte[] buffer, final int offset, final int length) {
+    public static String parseName(final byte[] buffer, final int offset, final int length) {
         try {
             return parseName(buffer, offset, length, DEFAULT_ENCODING);
         } catch (IOException ex) {
@@ -285,7 +285,7 @@ public class TarUtils {
      * @return The entry name.
      * @throws IOException on error
      */
-    public static String parseName(byte[] buffer, final int offset,
+    public static String parseName(final byte[] buffer, final int offset,
                                    final int length,
                                    final ZipEncoding encoding)
         throws IOException {
@@ -319,7 +319,7 @@ public class TarUtils {
      * @param length The maximum number of header bytes to copy.
      * @return The updated offset, i.e. offset + length
      */
-    public static int formatNameBytes(String name, byte[] buf, final int offset, final int length) {
+    public static int formatNameBytes(final String name, final byte[] buf, final int offset, final int length) {
         try {
             return formatNameBytes(name, buf, offset, length, DEFAULT_ENCODING);
         } catch (IOException ex) {
@@ -351,7 +351,7 @@ public class TarUtils {
      * @return The updated offset, i.e. offset + length
      * @throws IOException on error
      */
-    public static int formatNameBytes(String name, byte[] buf, final int offset,
+    public static int formatNameBytes(final String name, final byte[] buf, final int offset,
                                       final int length,
                                       final ZipEncoding encoding)
         throws IOException {
@@ -380,7 +380,7 @@ public class TarUtils {
      * @param length length of buffer to fill
      * @throws IllegalArgumentException if the value will not fit in the buffer
      */
-    public static void formatUnsignedOctalString(final long value, byte[] buffer,
+    public static void formatUnsignedOctalString(final long value, final byte[] buffer,
             final int offset, final int length) {
         int remaining = length;
         remaining--;
@@ -419,7 +419,7 @@ public class TarUtils {
      * @return The updated offset, i.e offset+length
      * @throws IllegalArgumentException if the value (and trailer) will not fit in the buffer
      */
-    public static int formatOctalBytes(final long value, byte[] buf, final int offset, final int length) {
+    public static int formatOctalBytes(final long value, final byte[] buf, final int offset, final int length) {
 
         int idx=length-2; // For space and trailing null
         formatUnsignedOctalString(value, buf, offset, idx);
@@ -444,7 +444,7 @@ public class TarUtils {
      * @return The updated offset
      * @throws IllegalArgumentException if the value (and trailer) will not fit in the buffer
      */
-    public static int formatLongOctalBytes(final long value, byte[] buf, final int offset, final int length) {
+    public static int formatLongOctalBytes(final long value, final byte[] buf, final int offset, final int length) {
 
         int idx=length-1; // For space
 
@@ -472,7 +472,7 @@ public class TarUtils {
      * @since 1.4
      */
     public static int formatLongOctalOrBinaryBytes(
-        final long value, byte[] buf, final int offset, final int length) {
+        final long value, final byte[] buf, final int offset, final int length) {
 
         // Check whether we are dealing with UID/GID or SIZE field
         final long maxAsOctalChar = length == TarConstants.UIDLEN ? TarConstants.MAXID : TarConstants.MAXSIZE;
@@ -491,7 +491,7 @@ public class TarUtils {
         return offset + length;
     }
 
-    private static void formatLongBinary(final long value, byte[] buf,
+    private static void formatLongBinary(final long value, final byte[] buf,
                                          final int offset, final int length,
                                          final boolean negative) {
         final int bits = (length - 1) * 8;
@@ -512,7 +512,7 @@ public class TarUtils {
         }
     }
 
-    private static void formatBigIntegerBinary(final long value, byte[] buf,
+    private static void formatBigIntegerBinary(final long value, final byte[] buf,
                                                final int offset,
                                                final int length,
                                                final boolean negative) {
@@ -541,7 +541,7 @@ public class TarUtils {
      * @return The updated value of offset, i.e. offset+length
      * @throws IllegalArgumentException if the value (and trailer) will not fit in the buffer
      */
-    public static int formatCheckSumOctalBytes(final long value, byte[] buf, final int offset, final int length) {
+    public static int formatCheckSumOctalBytes(final long value, final byte[] buf, final int offset, final int length) {
 
         int idx=length-2; // for NUL and space
         formatUnsignedOctalString(value, buf, offset, idx);
@@ -593,7 +593,7 @@ public class TarUtils {
      * @see <a href="https://issues.apache.org/jira/browse/COMPRESS-191">COMPRESS-191</a>
      * @since 1.5
      */
-    public static boolean verifyCheckSum(byte[] header) {
+    public static boolean verifyCheckSum(final byte[] header) {
         long storedSum = parseOctal(header, CHKSUM_OFFSET, CHKSUMLEN);
         long unsignedSum = 0;
         long signedSum = 0;

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java b/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java
index 21d5edf..ac7bbba 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java
@@ -48,7 +48,7 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField {
      * @param len The length of the encoded filename or commentin
      * <code>bytes</code>.
      */
-    protected AbstractUnicodeExtraField(String text, byte[] bytes, int off, int len) {
+    protected AbstractUnicodeExtraField(final String text, final byte[] bytes, final int off, final int len) {
         CRC32 crc32 = new CRC32();
         crc32.update(bytes, off, len);
         nameCRC32 = crc32.getValue();
@@ -68,7 +68,7 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField {
      * @param bytes The encoded of the filename or comment in the zip
      * file.
      */
-    protected AbstractUnicodeExtraField(String text, byte[] bytes) {
+    protected AbstractUnicodeExtraField(final String text, final byte[] bytes) {
         this(text, bytes, 0, bytes.length);
     }
 
@@ -96,7 +96,7 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField {
      * @param nameCRC32 The CRC32 checksum of the filename as encoded
      *         in the central directory of the zip file to set.
      */
-    public void setNameCRC32(long nameCRC32) {
+    public void setNameCRC32(final long nameCRC32) {
         this.nameCRC32 = nameCRC32;
         data = null;
     }
@@ -116,7 +116,7 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField {
     /**
      * @param unicodeName The UTF-8 encoded name to set.
      */
-    public void setUnicodeName(byte[] unicodeName) {
+    public void setUnicodeName(final byte[] unicodeName) {
         if (unicodeName != null) {
             this.unicodeName = new byte[unicodeName.length];
             System.arraycopy(unicodeName, 0, this.unicodeName, 0,
@@ -159,7 +159,7 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField {
     }
 
     @Override
-    public void parseFromLocalFileData(byte[] buffer, int offset, int length)
+    public void parseFromLocalFileData(final byte[] buffer, final int offset, final int length)
         throws ZipException {
 
         if (length < 5) {
@@ -184,8 +184,8 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField {
      * same data in central directory and local file data.
      */
     @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);
     }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/zip/AsiExtraField.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/AsiExtraField.java b/src/main/java/org/apache/commons/compress/archivers/zip/AsiExtraField.java
index 983422a..de5ad31 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/AsiExtraField.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/AsiExtraField.java
@@ -166,7 +166,7 @@ public class AsiExtraField implements ZipExtraField, UnixStat, Cloneable {
      * Set the user id.
      * @param uid the user id
      */
-    public void setUserId(int uid) {
+    public void setUserId(final int uid) {
         this.uid = uid;
     }
 
@@ -182,7 +182,7 @@ public class AsiExtraField implements ZipExtraField, UnixStat, Cloneable {
      * Set the group id.
      * @param gid the group id
      */
-    public void setGroupId(int gid) {
+    public void setGroupId(final int gid) {
         this.gid = gid;
     }
 
@@ -200,7 +200,7 @@ public class AsiExtraField implements ZipExtraField, UnixStat, Cloneable {
      * @param name Name of the file this entry links to, empty String
      *             if it is not a symbolic link.
      */
-    public void setLinkedFile(String name) {
+    public void setLinkedFile(final String name) {
         link = name;
         mode = getMode(mode);
     }
@@ -227,7 +227,7 @@ public class AsiExtraField implements ZipExtraField, UnixStat, Cloneable {
      * File mode of this file.
      * @param mode the file mode
      */
-    public void setMode(int mode) {
+    public void setMode(final int mode) {
         this.mode = getMode(mode);
     }
 
@@ -243,7 +243,7 @@ public class AsiExtraField implements ZipExtraField, UnixStat, Cloneable {
      * Indicate whether this entry is a directory.
      * @param dirFlag if true, this entry is a directory
      */
-    public void setDirectory(boolean dirFlag) {
+    public void setDirectory(final boolean dirFlag) {
         this.dirFlag = dirFlag;
         mode = getMode(mode);
     }
@@ -264,7 +264,7 @@ public class AsiExtraField implements ZipExtraField, UnixStat, Cloneable {
      * @throws ZipException on error
      */
     @Override
-    public void parseFromLocalFileData(byte[] data, int offset, int length)
+    public void parseFromLocalFileData(final byte[] data, final int offset, final int length)
         throws ZipException {
 
         long givenChecksum = ZipLong.getValue(data, offset);
@@ -302,8 +302,8 @@ public class AsiExtraField implements ZipExtraField, UnixStat, Cloneable {
      * same data in central directory and local file data.
      */
     @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);
     }
@@ -313,7 +313,7 @@ public class AsiExtraField implements ZipExtraField, UnixStat, Cloneable {
      * @param mode the mode
      * @return the type with the mode
      */
-    protected int getMode(int mode) {
+    protected int getMode(final int mode) {
         int type = FILE_FLAG;
         if (isLink()) {
             type = LINK_FLAG;

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/zip/BinaryTree.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/BinaryTree.java b/src/main/java/org/apache/commons/compress/archivers/zip/BinaryTree.java
index a4ac4b5..494fae8 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/BinaryTree.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/BinaryTree.java
@@ -44,7 +44,7 @@ class BinaryTree {
      */
     private final int[] tree;
 
-    public BinaryTree(int depth) {
+    public BinaryTree(final int depth) {
         tree = new int[(1 << (depth + 1)) - 1];
         Arrays.fill(tree, UNDEFINED);
     }
@@ -57,7 +57,7 @@ class BinaryTree {
      * @param depth  the number of nodes in the path
      * @param value  the value of the leaf (must be positive)
      */
-    public void addLeaf(int node, int path, int depth, int value) {
+    public void addLeaf(final int node, final int path, final int depth, final int value) {
         if (depth == 0) {
             // end of the path reached, add the value to the current node
             if (tree[node] == UNDEFINED) {
@@ -81,7 +81,7 @@ class BinaryTree {
      * @param stream
      * @return the value decoded, or -1 if the end of the stream is reached
      */
-    public int read(BitStream stream) throws IOException {
+    public int read(final BitStream stream) throws IOException {
         int currentIndex = 0;
 
         while (true) {
@@ -107,7 +107,7 @@ class BinaryTree {
     /**
      * Decodes the packed binary tree from the specified stream.
      */
-    static BinaryTree decode(InputStream in, final int totalNumberOfValues) throws IOException {
+    static BinaryTree decode(final InputStream in, final int totalNumberOfValues) throws IOException {
         // the first byte contains the size of the structure minus one
         int size = in.read() + 1;
         if (size == 0) {

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/zip/BitStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/BitStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/BitStream.java
index d40c1ad..98e80fe 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/BitStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/BitStream.java
@@ -32,7 +32,7 @@ import java.nio.ByteOrder;
  */
 class BitStream extends BitInputStream {
 
-    BitStream(InputStream in) {
+    BitStream(final InputStream in) {
         super(in, ByteOrder.LITTLE_ENDIAN);
     }
 

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/zip/CircularBuffer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/CircularBuffer.java b/src/main/java/org/apache/commons/compress/archivers/zip/CircularBuffer.java
index 10a35a8..ad50bd6 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/CircularBuffer.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/CircularBuffer.java
@@ -39,7 +39,7 @@ class CircularBuffer {
     /** Index of the next data written in the buffer */
     private int writeIndex;
 
-    CircularBuffer(int size) {
+    CircularBuffer(final int size) {
         this.size = size;
         buffer = new byte[size];
     }
@@ -54,7 +54,7 @@ class CircularBuffer {
     /**
      * Writes a byte to the buffer.
      */
-    public void put(int value) {
+    public void put(final int value) {
         buffer[writeIndex] = (byte) value;
         writeIndex = (writeIndex + 1) % size;
     }
@@ -77,7 +77,7 @@ class CircularBuffer {
      * @param distance the distance from the current write position
      * @param length   the number of bytes to copy
      */
-    public void copy(int distance, int length) {
+    public void copy(final int distance, final int length) {
         int pos1 = writeIndex - distance;
         int pos2 = pos1 + length;
         for (int i = pos1; i < pos2; i++) {

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java
----------------------------------------------------------------------
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 87d3c52..5949c60 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
@@ -70,7 +70,7 @@ class ExplodingInputStream extends InputStream {
      * @param numberOfTrees  the number of trees (2 or 3)
      * @param in             the compressed data stream
      */
-    public ExplodingInputStream(int dictionarySize, int numberOfTrees, InputStream in) {
+    public ExplodingInputStream(final int dictionarySize, final int numberOfTrees, final InputStream in) {
         if (dictionarySize != 4096 && dictionarySize != 8192) {
             throw new IllegalArgumentException("The dictionary size must be 4096 or 8192");
         }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/zip/ExtraFieldUtils.java
----------------------------------------------------------------------
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 c1e17d6..9cff3c2 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
@@ -61,7 +61,7 @@ public class ExtraFieldUtils {
      * the {@link ZipExtraField ZipExtraField interface}.</p>
      * @param c the class to register
      */
-    public static void register(Class<?> c) {
+    public static void register(final Class<?> c) {
         try {
             ZipExtraField ze = (ZipExtraField) c.newInstance();
             implementations.put(ze.getHeaderId(), c);
@@ -82,7 +82,7 @@ public class ExtraFieldUtils {
      * @exception InstantiationException if unable to instantiate the class
      * @exception IllegalAccessException if not allowed to instantiate the class
      */
-    public static ZipExtraField createExtraField(ZipShort headerId)
+    public static ZipExtraField createExtraField(final ZipShort headerId)
         throws InstantiationException, IllegalAccessException {
         Class<?> c = implementations.get(headerId);
         if (c != null) {
@@ -101,7 +101,7 @@ public class ExtraFieldUtils {
      * @return an array of ExtraFields
      * @throws ZipException on error
      */
-    public static ZipExtraField[] parse(byte[] data) throws ZipException {
+    public static ZipExtraField[] parse(final byte[] data) throws ZipException {
         return parse(data, true, UnparseableExtraField.THROW);
     }
 
@@ -114,7 +114,7 @@ public class ExtraFieldUtils {
      * @return an array of ExtraFields
      * @throws ZipException on error
      */
-    public static ZipExtraField[] parse(byte[] data, boolean local)
+    public static ZipExtraField[] parse(final byte[] data, final boolean local)
         throws ZipException {
         return parse(data, local, UnparseableExtraField.THROW);
     }
@@ -132,8 +132,8 @@ public class ExtraFieldUtils {
      *
      * @since 1.1
      */
-    public static ZipExtraField[] parse(byte[] data, boolean local,
-                                        UnparseableExtraField onUnparseableData)
+    public static ZipExtraField[] parse(final byte[] data, final boolean local,
+                                        final UnparseableExtraField onUnparseableData)
         throws ZipException {
         List<ZipExtraField> v = new ArrayList<ZipExtraField>();
         int start = 0;
@@ -198,7 +198,7 @@ public class ExtraFieldUtils {
      * @param data an array of ExtraFiles
      * @return an array of bytes
      */
-    public static byte[] mergeLocalFileDataData(ZipExtraField[] data) {
+    public static byte[] mergeLocalFileDataData(final ZipExtraField[] data) {
         final boolean lastIsUnparseableHolder = data.length > 0
             && data[data.length - 1] instanceof UnparseableExtraFieldData;
         int regularExtraFieldCount =
@@ -237,7 +237,7 @@ public class ExtraFieldUtils {
      * @param data an array of ExtraFields
      * @return an array of bytes
      */
-    public static byte[] mergeCentralDirectoryData(ZipExtraField[] data) {
+    public static byte[] mergeCentralDirectoryData(final ZipExtraField[] data) {
         final boolean lastIsUnparseableHolder = data.length > 0
             && data[data.length - 1] instanceof UnparseableExtraFieldData;
         int regularExtraFieldCount =
@@ -312,7 +312,7 @@ public class ExtraFieldUtils {
 
         private final int key;
 
-        private UnparseableExtraField(int k) {
+        private UnparseableExtraField(final int k) {
             key = k;
         }
 

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/zip/FallbackZipEncoding.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/FallbackZipEncoding.java b/src/main/java/org/apache/commons/compress/archivers/zip/FallbackZipEncoding.java
index 4551b79..757bcbd 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/FallbackZipEncoding.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/FallbackZipEncoding.java
@@ -57,7 +57,7 @@ class FallbackZipEncoding implements ZipEncoding {
      * @param charsetName The name of the charset or {@code null} for
      *                the platform's default character set.
      */
-    public FallbackZipEncoding(String charsetName) {
+    public FallbackZipEncoding(final String charsetName) {
         this.charsetName = charsetName;
     }
 
@@ -66,7 +66,7 @@ class FallbackZipEncoding implements ZipEncoding {
      * org.apache.commons.compress.archivers.zip.ZipEncoding#canEncode(java.lang.String)
      */
     @Override
-    public boolean canEncode(String name) {
+    public boolean canEncode(final String name) {
         return true;
     }
 
@@ -75,7 +75,7 @@ class FallbackZipEncoding implements ZipEncoding {
      * org.apache.commons.compress.archivers.zip.ZipEncoding#encode(java.lang.String)
      */
     @Override
-    public ByteBuffer encode(String name) throws IOException {
+    public ByteBuffer encode(final String name) throws IOException {
         if (this.charsetName == null) { // i.e. use default charset, see no-args constructor
             return ByteBuffer.wrap(name.getBytes());
         }
@@ -87,7 +87,7 @@ class FallbackZipEncoding implements ZipEncoding {
      * org.apache.commons.compress.archivers.zip.ZipEncoding#decode(byte[])
      */
     @Override
-    public String decode(byte[] data) throws IOException {
+    public String decode(final byte[] data) throws IOException {
         if (this.charsetName == null) { // i.e. use default charset, see no-args constructor
             return new String(data);
         }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBit.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBit.java b/src/main/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBit.java
index 07775db..73c13d5 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBit.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBit.java
@@ -91,7 +91,7 @@ public final class GeneralPurposeBit implements Cloneable {
      * whether the current entry will use UTF8 for file name and comment.
      * @param b whether the current entry will use UTF8 for file name and comment.
      */
-    public void useUTF8ForNames(boolean b) {
+    public void useUTF8ForNames(final boolean b) {
         languageEncodingFlag = b;
     }
 
@@ -111,7 +111,7 @@ public final class GeneralPurposeBit implements Cloneable {
      * @param b whether the current entry will use the data descriptor to store
      * CRC and size information
      */
-    public void useDataDescriptor(boolean b) {
+    public void useDataDescriptor(final boolean b) {
         dataDescriptorFlag = b;
     }
 
@@ -127,7 +127,7 @@ public final class GeneralPurposeBit implements Cloneable {
      * whether the current entry will be encrypted.
      * @param b whether the current entry will be encrypted
      */
-    public void useEncryption(boolean b) {
+    public void useEncryption(final boolean b) {
         encryptionFlag = b;
     }
 
@@ -143,7 +143,7 @@ public final class GeneralPurposeBit implements Cloneable {
      * whether the current entry will be encrypted  using strong encryption.
      * @param b whether the current entry will be encrypted  using strong encryption
      */
-    public void useStrongEncryption(boolean b) {
+    public void useStrongEncryption(final boolean b) {
         strongEncryptionFlag = b;
         if (b) {
             useEncryption(true);
@@ -183,7 +183,7 @@ public final class GeneralPurposeBit implements Cloneable {
      *         The offset within the output buffer of the first byte to be written.
      *         must be non-negative and no larger than <tt>buf.length-2</tt>
      */
-    public void encode(byte[] buf, int offset) {
+    public void encode(final byte[] buf, final int offset) {
                 ZipShort.putShort((dataDescriptorFlag ? DATA_DESCRIPTOR_FLAG : 0)
                         |
                         (languageEncodingFlag ? UFT8_NAMES_FLAG : 0)
@@ -222,7 +222,7 @@ public final class GeneralPurposeBit implements Cloneable {
     }
 
     @Override
-    public boolean equals(Object o) {
+    public boolean equals(final Object o) {
         if (!(o instanceof GeneralPurposeBit)) {
             return false;
         }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/zip/JarMarker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/JarMarker.java b/src/main/java/org/apache/commons/compress/archivers/zip/JarMarker.java
index 81d9053..ad12f37 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/JarMarker.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/JarMarker.java
@@ -102,7 +102,7 @@ public final class JarMarker implements ZipExtraField {
      * @throws ZipException on error
      */
     @Override
-    public void parseFromLocalFileData(byte[] data, int offset, int length)
+    public void parseFromLocalFileData(final byte[] data, final int offset, final int length)
         throws ZipException {
         if (length != 0) {
             throw new ZipException("JarMarker doesn't expect any data");
@@ -114,8 +114,8 @@ public final class JarMarker implements ZipExtraField {
      * same data in central directory and local file data.
      */
     @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);
     }

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/478bef36/src/main/java/org/apache/commons/compress/archivers/zip/NioZipEncoding.java
----------------------------------------------------------------------
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 9ec15a5..8cea9c7 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
@@ -47,7 +47,7 @@ class NioZipEncoding implements ZipEncoding {
      * 
      * @param charset The NIO charset to wrap.
      */
-    public NioZipEncoding(Charset charset) {
+    public NioZipEncoding(final Charset charset) {
         this.charset = charset;
     }
 
@@ -56,7 +56,7 @@ class NioZipEncoding implements ZipEncoding {
      * org.apache.commons.compress.archivers.zip.ZipEncoding#canEncode(java.lang.String)
      */
     @Override
-    public boolean canEncode(String name) {
+    public boolean canEncode(final String name) {
         CharsetEncoder enc = this.charset.newEncoder();
         enc.onMalformedInput(CodingErrorAction.REPORT);
         enc.onUnmappableCharacter(CodingErrorAction.REPORT);
@@ -69,7 +69,7 @@ class NioZipEncoding implements ZipEncoding {
      * org.apache.commons.compress.archivers.zip.ZipEncoding#encode(java.lang.String)
      */
     @Override
-    public ByteBuffer encode(String name) {
+    public ByteBuffer encode(final String name) {
         CharsetEncoder enc = this.charset.newEncoder();
 
         enc.onMalformedInput(CodingErrorAction.REPORT);
@@ -117,7 +117,7 @@ class NioZipEncoding implements ZipEncoding {
      * org.apache.commons.compress.archivers.zip.ZipEncoding#decode(byte[])
      */
     @Override
-    public String decode(byte[] data) throws IOException {
+    public String decode(final byte[] data) throws IOException {
         return this.charset.newDecoder()
             .onMalformedInput(CodingErrorAction.REPORT)
             .onUnmappableCharacter(CodingErrorAction.REPORT)


Mime
View raw message