commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1546272 - in /commons/proper/vfs/trunk/core/src: main/java/org/apache/commons/vfs2/provider/ftp/ main/java/org/apache/commons/vfs2/provider/ftps/ main/java/org/apache/commons/vfs2/provider/sftp/ test/java/org/apache/commons/ test/java/org/...
Date Thu, 28 Nov 2013 03:44:16 GMT
Author: ggregory
Date: Thu Nov 28 03:44:16 2013
New Revision: 1546272

URL: http://svn.apache.org/r1546272
Log:
Use final.

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientFactory.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
    commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/AbstractVfsTestCase.java
    commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/UserAuthenticationDataTestCase.java
    commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftps/test/AbstractFtpsProviderTestCase.java
    commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/AbstractTestSuite.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java?rev=1546272&r1=1546271&r2=1546272&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java
Thu Nov 28 03:44:16 2013
@@ -53,7 +53,7 @@ public final class FtpClientFactory
      * @return An FTPClient.
      * @throws FileSystemException if an error occurs while connecting.
      */
-    public static FTPClient createConnection(final String hostname, final int port, char[]
username, char[] password,
+    public static FTPClient createConnection(final String hostname, final int port, final
char[] username, final char[] password,
                                              final String workingDirectory, final FileSystemOptions
fileSystemOptions)
         throws FileSystemException
     {
@@ -62,7 +62,7 @@ public final class FtpClientFactory
     }
 
     public static class FtpConnectionFactory extends ConnectionFactory<FTPClient, FtpFileSystemConfigBuilder>
{
-        private FtpConnectionFactory(FtpFileSystemConfigBuilder builder)
+        private FtpConnectionFactory(final FtpFileSystemConfigBuilder builder)
         {
             super(builder);
         }
@@ -87,7 +87,7 @@ public final class FtpClientFactory
         protected Log log = LogFactory.getLog(getClass());
         protected B builder;
 
-        protected ConnectionFactory(B builder)
+        protected ConnectionFactory(final B builder)
         {
             this.builder = builder;
         }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java?rev=1546272&r1=1546271&r2=1546272&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java
Thu Nov 28 03:44:16 2013
@@ -61,7 +61,7 @@ public class FtpFileSystemConfigBuilder 
     }
 
     /** @since 2.1 */
-    protected FtpFileSystemConfigBuilder(String prefix) {
+    protected FtpFileSystemConfigBuilder(final String prefix) {
         super(prefix);
     }
 

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientFactory.java?rev=1546272&r1=1546271&r2=1546272&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientFactory.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientFactory.java
Thu Nov 28 03:44:16 2013
@@ -50,7 +50,7 @@ public final class FtpsClientFactory
      * @return The FTPSClient.
      * @throws FileSystemException if an error occurs.
      */
-    public static FTPSClient createConnection(final String hostname, final int port, char[]
username, char[] password,
+    public static FTPSClient createConnection(final String hostname, final int port, final
char[] username, final char[] password,
             final String workingDirectory, final FileSystemOptions fileSystemOptions) throws
FileSystemException
     {
         final FtpsConnectionFactory factory = new FtpsConnectionFactory(FtpsFileSystemConfigBuilder.getInstance());

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java?rev=1546272&r1=1546271&r2=1546272&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
Thu Nov 28 03:44:16 2013
@@ -127,13 +127,13 @@ public class SftpFileSystem
                 }
             }
 
-            String fileNameEncoding = SftpFileSystemConfigBuilder.getInstance().getFileNameEncoding(
+            final String fileNameEncoding = SftpFileSystemConfigBuilder.getInstance().getFileNameEncoding(
                     getFileSystemOptions());
 
             if (fileNameEncoding != null) {
                 try {
                     channel.setFilenameEncoding(fileNameEncoding);
-                } catch (SftpException e) {
+                } catch (final SftpException e) {
                     throw new FileSystemException("vfs.provider.sftp/filename-encoding.error",
fileNameEncoding);
                 }
             }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java?rev=1546272&r1=1546271&r2=1546272&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
Thu Nov 28 03:44:16 2013
@@ -176,7 +176,7 @@ public final class SftpFileSystemConfigB
      *            The FileSystem options.
      * @return the file name encoding
      */
-    public String getFileNameEncoding(FileSystemOptions opts) 
+    public String getFileNameEncoding(final FileSystemOptions opts) 
     {
         return this.getString(opts, ENCODING);
     }
@@ -437,7 +437,7 @@ public final class SftpFileSystemConfigB
      *            The FileSystem options.
      * @param fileNameEncoding
      */
-    public void setFileNameEncoding(FileSystemOptions opts, String fileNameEncoding) 
+    public void setFileNameEncoding(final FileSystemOptions opts, final String fileNameEncoding)

     {
         this.setParam(opts, ENCODING, fileNameEncoding);
     }

Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/AbstractVfsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/AbstractVfsTestCase.java?rev=1546272&r1=1546271&r2=1546272&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/AbstractVfsTestCase.java
(original)
+++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/AbstractVfsTestCase.java
Thu Nov 28 03:44:16 2013
@@ -112,7 +112,7 @@ public abstract class AbstractVfsTestCas
             if (baseDirProp.startsWith("file://")) {
                 try {
                     baseDir = getCanonicalFile(new File(new URI(baseDirProp)));
-                } catch (URISyntaxException e) {
+                } catch (final URISyntaxException e) {
                     baseDir = getCanonicalFile(new File(baseDirProp));
                 }
             } else {

Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/UserAuthenticationDataTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/UserAuthenticationDataTestCase.java?rev=1546272&r1=1546271&r2=1546272&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/UserAuthenticationDataTestCase.java
(original)
+++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/UserAuthenticationDataTestCase.java
Thu Nov 28 03:44:16 2013
@@ -25,8 +25,8 @@ public class UserAuthenticationDataTestC
     @Test
     public void testCharacterBasedData()
     {
-        UserAuthenticationData data = new UserAuthenticationData();
-        char[] array = "PMC".toCharArray();
+        final UserAuthenticationData data = new UserAuthenticationData();
+        final char[] array = "PMC".toCharArray();
         data.setData(UserAuthenticationData.USERNAME, array);
         data.setData(UserAuthenticationData.DOMAIN, "Apache".toCharArray());
         assertSame(array, data.getData(UserAuthenticationData.USERNAME));
@@ -38,16 +38,16 @@ public class UserAuthenticationDataTestC
         data.cleanup();
         assertNull(data.getData(UserAuthenticationData.USERNAME));
         assertNull(data.getData(UserAuthenticationData.DOMAIN));
-        char[] nulls = {0,0,0};
+        final char[] nulls = {0,0,0};
         assertArrayEquals(nulls, array);
     }
 
     @Test
     public void testCustomType()
     {
-        UserAuthenticationData.Type type = new UserAuthenticationData.Type("JUNIT"); 
-        UserAuthenticationData data = new UserAuthenticationData();
-        char[] array = "test".toCharArray();
+        final UserAuthenticationData.Type type = new UserAuthenticationData.Type("JUNIT");

+        final UserAuthenticationData data = new UserAuthenticationData();
+        final char[] array = "test".toCharArray();
         data.setData(type, array);
         assertSame(array, data.getData(type));
     }

Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftps/test/AbstractFtpsProviderTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftps/test/AbstractFtpsProviderTestCase.java?rev=1546272&r1=1546271&r2=1546272&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftps/test/AbstractFtpsProviderTestCase.java
(original)
+++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftps/test/AbstractFtpsProviderTestCase.java
Thu Nov 28 03:44:16 2013
@@ -92,7 +92,7 @@ abstract class AbstractFtpsProviderTestC
      * @throws FtpException
      * @throws IOException
      */
-    static void setUpClass(boolean implicit) throws FtpException, IOException
+    static void setUpClass(final boolean implicit) throws FtpException, IOException
     {
         if (Server != null)
         {
@@ -148,9 +148,9 @@ abstract class AbstractFtpsProviderTestC
     }
 
     static final class FtpProviderTestSuite extends ProviderTestSuite { 
-        private boolean implicit;
+        private final boolean implicit;
 
-        public FtpProviderTestSuite(AbstractFtpsProviderTestCase providerConfig) throws Exception
+        public FtpProviderTestSuite(final AbstractFtpsProviderTestCase providerConfig) throws
Exception
         {
             super(providerConfig);
             this.implicit = providerConfig.isImplicit();

Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/AbstractTestSuite.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/AbstractTestSuite.java?rev=1546272&r1=1546271&r2=1546272&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/AbstractTestSuite.java
(original)
+++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/AbstractTestSuite.java
Thu Nov 28 03:44:16 2013
@@ -141,7 +141,7 @@ public abstract class AbstractTestSuite
 
     @Override
     public void run(final TestResult result) {
-        Protectable p = new Protectable() {
+        final Protectable p = new Protectable() {
             @Override
             public void protect() throws Exception {
                 setUp();



Mime
View raw message