commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1436881 - in /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress: archivers/dump/ archivers/jar/ archivers/tar/ compressors/gzip/
Date Tue, 22 Jan 2013 12:48:17 GMT
Author: ggregory
Date: Tue Jan 22 12:48:16 2013
New Revision: 1436881

URL: http://svn.apache.org/viewvc?rev=1436881&view=rev
Log:
Add final modifier to private fields.

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/Dirent.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseEntry.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/Dirent.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/Dirent.java?rev=1436881&r1=1436880&r2=1436881&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/Dirent.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/Dirent.java
Tue Jan 22 12:48:16 2013
@@ -22,10 +22,10 @@ package org.apache.commons.compress.arch
  * Directory entry.
  */
 class Dirent {
-    private int ino;
-    private int parentIno;
-    private int type;
-    private String name;
+    private final int ino;
+    private final int parentIno;
+    private final int type;
+    private final String name;
 
     /**
      * Constructor

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java?rev=1436881&r1=1436880&r2=1436881&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
Tue Jan 22 12:48:16 2013
@@ -190,10 +190,10 @@ public class DumpArchiveEntry implements
     /**
      * Currently unused
      */
-    private DumpArchiveSummary summary = null;
+    private final DumpArchiveSummary summary = null;
 
     // this information is available from standard index.
-    private TapeSegmentHeader header = new TapeSegmentHeader();
+    private final TapeSegmentHeader header = new TapeSegmentHeader();
     private String simpleName;
     private String originalName;
 
@@ -523,7 +523,7 @@ public class DumpArchiveEntry implements
         private int ino;
         private int count;
         private int holes;
-        private byte[] cdata = new byte[512]; // map of any 'holes'
+        private final byte[] cdata = new byte[512]; // map of any 'holes'
 
         public DumpArchiveConstants.SEGMENT_TYPE getType() {
             return type;

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java?rev=1436881&r1=1436880&r2=1436881&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
Tue Jan 22 12:48:16 2013
@@ -49,17 +49,17 @@ public class DumpArchiveInputStream exte
     private long entrySize;
     private long entryOffset;
     private int readIdx;
-    private byte[] readBuf = new byte[DumpArchiveConstants.TP_SIZE];
+    private final byte[] readBuf = new byte[DumpArchiveConstants.TP_SIZE];
     private byte[] blockBuffer;
     private int recordOffset;
     private long filepos;
     protected TapeInputStream raw;
 
     // map of ino -> dirent entry. We can use this to reconstruct full paths.
-    private Map<Integer, Dirent> names = new HashMap<Integer, Dirent>();
+    private final Map<Integer, Dirent> names = new HashMap<Integer, Dirent>();
 
     // map of ino -> (directory) entry when we're missing one or more elements in the
path.
-    private Map<Integer, DumpArchiveEntry> pending = new HashMap<Integer, DumpArchiveEntry>();
+    private final Map<Integer, DumpArchiveEntry> pending = new HashMap<Integer,
DumpArchiveEntry>();
 
     // queue of (directory) entries where we now have the full path.
     private Queue<DumpArchiveEntry> queue;

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java?rev=1436881&r1=1436880&r2=1436881&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java
Tue Jan 22 12:48:16 2013
@@ -37,7 +37,7 @@ class TapeInputStream extends FilterInpu
     private byte[] blockBuffer = new byte[DumpArchiveConstants.TP_SIZE];
     private int currBlkIdx = -1;
     private int blockSize = DumpArchiveConstants.TP_SIZE;
-    private int recordSize = DumpArchiveConstants.TP_SIZE;
+    private final int recordSize = DumpArchiveConstants.TP_SIZE;
     private int readOffset = DumpArchiveConstants.TP_SIZE;
     private boolean isCompressed = false;
     private long bytesRead = 0;

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java?rev=1436881&r1=1436880&r2=1436881&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
Tue Jan 22 12:48:16 2013
@@ -32,8 +32,8 @@ import org.apache.commons.compress.archi
  */
 public class JarArchiveEntry extends ZipArchiveEntry {
 
-    private Attributes manifestAttributes = null;
-    private Certificate[] certificates = null;
+    private final Attributes manifestAttributes = null;
+    private final Certificate[] certificates = null;
 
     public JarArchiveEntry(ZipEntry entry) throws ZipException {
         super(entry);

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseEntry.java?rev=1436881&r1=1436880&r2=1436881&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseEntry.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseEntry.java
Tue Jan 22 12:48:16 2013
@@ -42,7 +42,7 @@ import java.io.IOException;
 
 public class TarArchiveSparseEntry implements TarConstants {
     /** If an extension sparse header follows. */
-    private boolean isExtended;
+    private final boolean isExtended;
 
     /**
      * Construct an entry from an archive's header bytes. File is set

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.java?rev=1436881&r1=1436880&r2=1436881&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.java
Tue Jan 22 12:48:16 2013
@@ -69,7 +69,7 @@ public class GzipCompressorInputStream e
     private Inflater inf = new Inflater(true);
 
     // CRC32 from uncompressed data
-    private CRC32 crc = new CRC32();
+    private final CRC32 crc = new CRC32();
 
     private int memberSize;
 



Mime
View raw message