commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1030179 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs: ./ operations/ operations/vcs/ provider/compressed/ provider/ftp/ provider/jar/ provider/ram/ provider/sftp/ provider/url/ util/
Date Tue, 02 Nov 2010 19:03:33 GMT
Author: sebb
Date: Tue Nov  2 19:03:32 2010
New Revision: 1030179

URL: http://svn.apache.org/viewvc?rev=1030179&view=rev
Log:
VFS-326 Multi-threading issues - make private fields final where possible

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileFilterSelector.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/UserAuthenticationData.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/AbstractFileOperation.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/AbstractFileOperationProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/DefaultFileOperations.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLogEntry.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/compressed/CompressedFileFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarURLConnectionImpl.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileRandomAccessContent.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileSystemConfigBuilder.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/TrustEveryoneUserInfo.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/url/UrlFileNameParser.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/DelegatingFileSystemOptionsBuilder.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileFilterSelector.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileFilterSelector.java?rev=1030179&r1=1030178&r2=1030179&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileFilterSelector.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileFilterSelector.java
Tue Nov  2 19:03:32 2010
@@ -29,16 +29,16 @@ public class FileFilterSelector extends 
     /**
      * The FileFilter.
      */
-    private FileFilter fileFilter;
+    private final FileFilter fileFilter;
 
     public FileFilterSelector()
     {
-        super(1, 1);
+        this(null);
     }
 
     public FileFilterSelector(FileFilter fileFilter)
     {
-        this();
+        super(1, 1);
         this.fileFilter = fileFilter;
     }
 

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/UserAuthenticationData.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/UserAuthenticationData.java?rev=1030179&r1=1030178&r2=1030179&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/UserAuthenticationData.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/UserAuthenticationData.java
Tue Nov  2 19:03:32 2010
@@ -88,7 +88,7 @@ public class UserAuthenticationData
     public static final Type DOMAIN = new Type("domain");
 
     /** The authentication data. */
-    private Map authenticationData = new TreeMap();
+    private final Map authenticationData = new TreeMap();
 
     public UserAuthenticationData()
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/AbstractFileOperation.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/AbstractFileOperation.java?rev=1030179&r1=1030178&r2=1030179&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/AbstractFileOperation.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/AbstractFileOperation.java
Tue Nov  2 19:03:32 2010
@@ -28,7 +28,7 @@ public abstract class AbstractFileOperat
     /**
      * FileObject which the FileOperation is operate on.
      */
-    private FileObject fileObject;
+    private final FileObject fileObject;
 
     /**
      * @param file The FileObject.

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/AbstractFileOperationProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/AbstractFileOperationProvider.java?rev=1030179&r1=1030178&r2=1030179&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/AbstractFileOperationProvider.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/AbstractFileOperationProvider.java
Tue Nov  2 19:03:32 2010
@@ -39,7 +39,7 @@ public abstract class AbstractFileOperat
      * "svn", "svnssh", but not for "file", etc. The Map has scheme as a key and
      * Colleaction of operations that are available for that scheme.
      */
-    private Collection operations = new ArrayList();
+    private final Collection operations = new ArrayList();
 
     /**
      * Gather available operations for the specified FileObject and put them into

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/DefaultFileOperations.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/DefaultFileOperations.java?rev=1030179&r1=1030178&r2=1030179&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/DefaultFileOperations.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/DefaultFileOperations.java
Tue Nov  2 19:03:32 2010
@@ -33,12 +33,12 @@ public class DefaultFileOperations imple
     /**
      *
      */
-    private FileSystemManager fsmanager;
+    private final FileSystemManager fsmanager;
 
     /**
      *
      */
-    private FileObject fileObject;
+    private final FileObject fileObject;
 
     /**
      *

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLogEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLogEntry.java?rev=1030179&r1=1030178&r2=1030179&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLogEntry.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLogEntry.java
Tue Nov  2 19:03:32 2010
@@ -28,27 +28,27 @@ public class VcsLogEntry
     /**
      *
      */
-    private String author;
+    private final String author;
 
     /**
      * Revision.
      */
-    private long revision;
+    private final long revision;
 
     /**
      * Message.
      */
-    private String message;
+    private final String message;
 
     /**
      * Date.
      */
-    private Calendar date;
+    private final Calendar date;
 
     /**
      * Path.
      */
-    private String path;
+    private final String path;
 
     /**
      *

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/compressed/CompressedFileFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/compressed/CompressedFileFileObject.java?rev=1030179&r1=1030178&r2=1030179&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/compressed/CompressedFileFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/compressed/CompressedFileFileObject.java
Tue Nov  2 19:03:32 2010
@@ -35,7 +35,7 @@ public abstract class CompressedFileFile
     implements FileObject
 {
     private final FileObject container;
-    private String[] children;
+    private final String[] children;
 
     protected CompressedFileFileObject(FileName name, FileObject container, CompressedFileFileSystem
fs)
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java?rev=1030179&r1=1030178&r2=1030179&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java
Tue Nov  2 19:03:32 2010
@@ -55,7 +55,7 @@ public class FtpFileObject
     private static final Map EMPTY_FTP_FILE_MAP = Collections.unmodifiableMap(new TreeMap());
     private static final FTPFile UNKNOWN = new FTPFile();
 
-    private Log log = LogFactory.getLog(FtpFileObject.class);
+    private final Log log = LogFactory.getLog(FtpFileObject.class);
     private final FtpFileSystem ftpFs;
     private final String relPath;
 

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarURLConnectionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarURLConnectionImpl.java?rev=1030179&r1=1030178&r2=1030179&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarURLConnectionImpl.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarURLConnectionImpl.java
Tue Nov  2 19:03:32 2010
@@ -43,10 +43,10 @@ public class JarURLConnectionImpl
     // This is because JarURLConnection SUCKS
     private static final String HACK_URL = "jar:http://somehost/somejar.jar!/";
 
-    private FileContent content;
-    private URL parentURL;
-    private JarFileObject file;
-    private String entryName;
+    private final FileContent content;
+    private final URL parentURL;
+    private final JarFileObject file;
+    private final String entryName;
 
     public JarURLConnectionImpl(JarFileObject file, FileContent content)
         throws MalformedURLException, FileSystemException

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileObject.java?rev=1030179&r1=1030178&r2=1030179&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileObject.java
Tue Nov  2 19:03:32 2010
@@ -39,7 +39,7 @@ public class RamFileObject extends Abstr
     /**
      * File System.
      */
-    private RamFileSystem fs;
+    private final RamFileSystem fs;
 
     /**
      * RAM File Object Data.

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileRandomAccessContent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileRandomAccessContent.java?rev=1030179&r1=1030178&r2=1030179&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileRandomAccessContent.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileRandomAccessContent.java
Tue Nov  2 19:03:32 2010
@@ -45,34 +45,34 @@ public class RamFileRandomAccessContent 
     /**
      * buffer
      */
-    private byte[] buffer8 = new byte[8];
+    private final byte[] buffer8 = new byte[8];
 
     /**
      * buffer
      */
-    private byte[] buffer4 = new byte[4];
+    private final byte[] buffer4 = new byte[4];
 
     /**
      * buffer
      */
-    private byte[] buffer2 = new byte[2];
+    private final byte[] buffer2 = new byte[2];
 
     /**
      * buffer
      */
-    private byte[] buffer1 = new byte[1];
+    private final byte[] buffer1 = new byte[1];
 
     /**
      * Mode
      */
-    private RandomAccessMode mode;
+    private final RandomAccessMode mode;
 
     /**
      * File
      */
-    private RamFileObject file;
+    private final RamFileObject file;
 
-    private InputStream rafis;
+    private final InputStream rafis;
 
     /**
      * @param file The file to access.

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileSystemConfigBuilder.java?rev=1030179&r1=1030178&r2=1030179&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileSystemConfigBuilder.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileSystemConfigBuilder.java
Tue Nov  2 19:03:32 2010
@@ -30,7 +30,7 @@ public final class RamFileSystemConfigBu
     private static final String MAX_SIZE_KEY = "maxsize";
 
     /** config builder singleton. */
-    private static RamFileSystemConfigBuilder singleton = new RamFileSystemConfigBuilder();
+    private static final RamFileSystemConfigBuilder singleton = new RamFileSystemConfigBuilder();
 
     /**
      * Constructor

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/TrustEveryoneUserInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/TrustEveryoneUserInfo.java?rev=1030179&r1=1030178&r2=1030179&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/TrustEveryoneUserInfo.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/TrustEveryoneUserInfo.java
Tue Nov  2 19:03:32 2010
@@ -26,7 +26,7 @@ import org.apache.commons.logging.LogFac
  */
 public class TrustEveryoneUserInfo implements UserInfo
 {
-    private Log log = LogFactory.getLog(TrustEveryoneUserInfo.class);
+    private final Log log = LogFactory.getLog(TrustEveryoneUserInfo.class);
 
     public String getPassphrase()
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/url/UrlFileNameParser.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/url/UrlFileNameParser.java?rev=1030179&r1=1030178&r2=1030179&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/url/UrlFileNameParser.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/url/UrlFileNameParser.java
Tue Nov  2 19:03:32 2010
@@ -33,8 +33,8 @@ import org.apache.commons.vfs.provider.l
  */
 public class UrlFileNameParser extends AbstractFileNameParser
 {
-    private URLFileNameParser url = new URLFileNameParser(80);
-    private GenericFileNameParser generic = new GenericFileNameParser();
+    private final URLFileNameParser url = new URLFileNameParser(80);
+    private final GenericFileNameParser generic = new GenericFileNameParser();
 
     public UrlFileNameParser()
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/DelegatingFileSystemOptionsBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/DelegatingFileSystemOptionsBuilder.java?rev=1030179&r1=1030178&r2=1030179&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/DelegatingFileSystemOptionsBuilder.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/DelegatingFileSystemOptionsBuilder.java
Tue Nov  2 19:03:32 2010
@@ -55,7 +55,7 @@ public class DelegatingFileSystemOptions
 
     private static final Map PRIMATIVE_TO_OBJECT = new TreeMap();
 
-    private Log log = LogFactory.getLog(DelegatingFileSystemOptionsBuilder.class);
+    private final Log log = LogFactory.getLog(DelegatingFileSystemOptionsBuilder.class);
 
     private final FileSystemManager manager;
 



Mime
View raw message