commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1845663 - in /commons/proper/vfs/trunk: commons-vfs2-examples/src/main/java/org/apache/commons/vfs2/example/ commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/ commons-vfs2/src/main/java/org/apache/commons/vfs2/util/
Date Sat, 03 Nov 2018 14:52:00 GMT
Author: ggregory
Date: Sat Nov  3 14:51:59 2018
New Revision: 1845663

URL: http://svn.apache.org/viewvc?rev=1845663&view=rev
Log:
Use final.

Modified:
    commons/proper/vfs/trunk/commons-vfs2-examples/src/main/java/org/apache/commons/vfs2/example/Shell.java
    commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileProvider.java
    commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystem.java
    commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystemConfigBuilder.java
    commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/URIUtils.java

Modified: commons/proper/vfs/trunk/commons-vfs2-examples/src/main/java/org/apache/commons/vfs2/example/Shell.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2-examples/src/main/java/org/apache/commons/vfs2/example/Shell.java?rev=1845663&r1=1845662&r2=1845663&view=diff
==============================================================================
--- commons/proper/vfs/trunk/commons-vfs2-examples/src/main/java/org/apache/commons/vfs2/example/Shell.java
(original)
+++ commons/proper/vfs/trunk/commons-vfs2-examples/src/main/java/org/apache/commons/vfs2/example/Shell.java
Sat Nov  3 14:51:59 2018
@@ -78,7 +78,7 @@ public final class Shell {
                 manager.addProvider("http4", (FileProvider) Class.forName("org.apache.commons.vfs2.provider.http4.Http4FileProvider").newInstance());
                 manager.addProvider("http4s", (FileProvider) Class.forName("org.apache.commons.vfs2.provider.http4s.Http4sFileProvider").newInstance());
             }
-        } catch (Exception e) {
+        } catch (final Exception e) {
             if (httpClient4Available) {
                 e.printStackTrace();
             }

Modified: commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileProvider.java?rev=1845663&r1=1845662&r2=1845663&view=diff
==============================================================================
--- commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileProvider.java
(original)
+++ commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileProvider.java
Sat Nov  3 14:51:59 2018
@@ -121,7 +121,7 @@ public class Http4FileProvider extends A
     }
 
     @Override
-    protected FileSystem doCreateFileSystem(FileName name, FileSystemOptions fileSystemOptions)
+    protected FileSystem doCreateFileSystem(final FileName name, final FileSystemOptions
fileSystemOptions)
             throws FileSystemException {
         final GenericFileName rootName = (GenericFileName) name;
 
@@ -217,15 +217,15 @@ public class Http4FileProvider extends A
             }
 
             return sslContextBuilder.build();
-        } catch (KeyStoreException e) {
+        } catch (final KeyStoreException e) {
             throw new FileSystemException("Keystore error. " + e.getMessage(), e);
-        } catch (KeyManagementException e) {
+        } catch (final KeyManagementException e) {
             throw new FileSystemException("Cannot retrieve keys. " + e.getMessage(), e);
-        } catch (NoSuchAlgorithmException e) {
+        } catch (final NoSuchAlgorithmException e) {
             throw new FileSystemException("Algorithm error. " + e.getMessage(), e);
-        } catch (CertificateException e) {
+        } catch (final CertificateException e) {
             throw new FileSystemException("Certificate error. " + e.getMessage(), e);
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new FileSystemException("Cannot open key file. " + e.getMessage(), e);
         }
     }
@@ -343,7 +343,7 @@ public class Http4FileProvider extends A
         final Cookie[] cookies = builder.getCookies(fileSystemOptions);
 
         if (cookies != null) {
-            for (Cookie cookie : cookies) {
+            for (final Cookie cookie : cookies) {
                 cookieStore.addCookie(cookie);
             }
         }

Modified: commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystem.java?rev=1845663&r1=1845662&r2=1845663&view=diff
==============================================================================
--- commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystem.java
(original)
+++ commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystem.java
Sat Nov  3 14:51:59 2018
@@ -57,8 +57,8 @@ public class Http4FileSystem extends Abs
      * @param httpClient {@link HttpClient} instance
      * @param httpClientContext {@link HttpClientContext} instance
      */
-    protected Http4FileSystem(FileName rootName, FileSystemOptions fileSystemOptions, HttpClient
httpClient,
-            HttpClientContext httpClientContext) {
+    protected Http4FileSystem(final FileName rootName, final FileSystemOptions fileSystemOptions,
final HttpClient httpClient,
+            final HttpClientContext httpClientContext) {
         super(rootName, null, fileSystemOptions);
 
         final String rootURI = getRootURI();
@@ -77,12 +77,12 @@ public class Http4FileSystem extends Abs
     }
 
     @Override
-    protected FileObject createFile(AbstractFileName name) throws Exception {
+    protected FileObject createFile(final AbstractFileName name) throws Exception {
         return new Http4FileObject<>(name, this);
     }
 
     @Override
-    protected void addCapabilities(Collection<Capability> caps) {
+    protected void addCapabilities(final Collection<Capability> caps) {
         caps.addAll(Http4FileProvider.capabilities);
     }
 
@@ -91,7 +91,7 @@ public class Http4FileSystem extends Abs
         if (httpClient instanceof CloseableHttpClient) {
             try {
                 ((CloseableHttpClient) httpClient).close();
-            } catch (IOException e) {
+            } catch (final IOException e) {
                 throw new RuntimeException("Error closing HttpClient", e);
             }
         }

Modified: commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystemConfigBuilder.java?rev=1845663&r1=1845662&r2=1845663&view=diff
==============================================================================
--- commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystemConfigBuilder.java
(original)
+++ commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystemConfigBuilder.java
Sat Nov  3 14:51:59 2018
@@ -417,7 +417,7 @@ public class Http4FileSystemConfigBuilde
      * @param opts The FileSystemOptions.
      * @param keepAlive whether the FileSystemOptions indicate that HTTP Keep-Alive is respected
or not.
      */
-    public void setKeepAlive(final FileSystemOptions opts, boolean keepAlive) {
+    public void setKeepAlive(final FileSystemOptions opts, final boolean keepAlive) {
         setParam(opts, KEEP_ALIVE, Boolean.valueOf(keepAlive));
     }
 
@@ -457,7 +457,7 @@ public class Http4FileSystemConfigBuilde
      * @param opts the file system options to modify
      * @param keyStoreFile keystore file path
      */
-    public void setKeyStoreFile(final FileSystemOptions opts, String keyStoreFile) {
+    public void setKeyStoreFile(final FileSystemOptions opts, final String keyStoreFile)
{
         setParam(opts, KEYSTORE_FILE, keyStoreFile);
     }
 
@@ -475,7 +475,7 @@ public class Http4FileSystemConfigBuilde
      * @param opts the file system options to modify
      * @param keyStorePass keystore pass phrase for SSL connecdtions
      */
-    public void setKeyStorePass(final FileSystemOptions opts, String keyStorePass) {
+    public void setKeyStorePass(final FileSystemOptions opts, final String keyStorePass)
{
         setParam(opts, KEYSTORE_PASS, keyStorePass);
     }
 
@@ -494,7 +494,7 @@ public class Http4FileSystemConfigBuilde
      * @param opts The FileSystemOptions.
      * @param hostnameVerificationEnabled whether hostname should be verified
      */
-    public void setHostnameVerificationEnabled(final FileSystemOptions opts, boolean hostnameVerificationEnabled)
{
+    public void setHostnameVerificationEnabled(final FileSystemOptions opts, final boolean
hostnameVerificationEnabled) {
         setParam(opts, HOSTNAME_VERIFICATION_ENABLED, Boolean.valueOf(hostnameVerificationEnabled));
     }
 

Modified: commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/URIUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/URIUtils.java?rev=1845663&r1=1845662&r2=1845663&view=diff
==============================================================================
--- commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/URIUtils.java
(original)
+++ commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/URIUtils.java
Sat Nov  3 14:51:59 2018
@@ -53,7 +53,7 @@ public class URIUtils {
      * 
      * @throws URISyntaxException if the default protocol charset is not supported
      */
-    public static String encodePath(String unescaped) throws URISyntaxException {
+    public static String encodePath(final String unescaped) throws URISyntaxException {
         return encodePath(unescaped, DEFAULT_PROTOCOL_CHARSET);
     }
 
@@ -67,7 +67,7 @@ public class URIUtils {
      * 
      * @throws URISyntaxException if the charset is not supported
      */
-    public static String encodePath(String unescaped, String charset) throws URISyntaxException
{
+    public static String encodePath(final String unescaped, final String charset) throws
URISyntaxException {
         if (unescaped == null) {
             throw new IllegalArgumentException("The string to encode may not be null.");
         }
@@ -75,8 +75,8 @@ public class URIUtils {
         return encode(unescaped, URIBitSets.allowed_abs_path, charset);
     }
 
-    private static String encode(String unescaped, BitSet allowed, String charset) throws
URISyntaxException {
-        byte[] rawdata = URLCodecUtils.encodeUrl(allowed, EncodingUtils.getBytes(unescaped,
charset));
+    private static String encode(final String unescaped, final BitSet allowed, final String
charset) throws URISyntaxException {
+        final byte[] rawdata = URLCodecUtils.encodeUrl(allowed, EncodingUtils.getBytes(unescaped,
charset));
         return EncodingUtils.getAsciiString(rawdata, 0, rawdata.length);
     }
 
@@ -179,7 +179,7 @@ public class URIUtils {
          * @param charset the desired character encoding
          * @return The resulting byte array.
          */
-        static byte[] getBytes(final String data, String charset) {
+        static byte[] getBytes(final String data, final String charset) {
             if (data == null) {
                 throw new IllegalArgumentException("data may not be null");
             }
@@ -190,7 +190,7 @@ public class URIUtils {
 
             try {
                 return data.getBytes(charset);
-            } catch (UnsupportedEncodingException e) {
+            } catch (final UnsupportedEncodingException e) {
 
                 if (LOG.isWarnEnabled()) {
                     LOG.warn("Unsupported encoding: " + charset + ". System encoding used.");
@@ -210,10 +210,10 @@ public class URIUtils {
          * @param length the number of bytes to encode 
          * @return The string representation of the byte array
          */
-        static String getAsciiString(final byte[] data, int offset, int length) {
+        static String getAsciiString(final byte[] data, final int offset, final int length)
{
             try {
                 return new String(data, offset, length, "US-ASCII");
-            } catch (UnsupportedEncodingException e) {
+            } catch (final UnsupportedEncodingException e) {
                 throw new RuntimeException("US-ASCII charset is not supported.");
             }
         }



Mime
View raw message