commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r833480 - in /commons/proper/vfs/trunk/core/src: main/java/org/apache/commons/vfs/ main/java/org/apache/commons/vfs/provider/http/ test/java/org/apache/commons/vfs/test/
Date Fri, 06 Nov 2009 17:37:05 GMT
Author: rgoers
Date: Fri Nov  6 17:37:05 2009
New Revision: 833480

URL: http://svn.apache.org/viewvc?rev=833480&view=rev
Log:
Fix some checkstyle errors.

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemOptions.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/provider/http/HttpClientFactory.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileContentInfoFactory.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileNameParser.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileSystem.java
    commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/VerifyingFileSelector.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemOptions.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemOptions.java?rev=833480&r1=833479&r2=833480&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemOptions.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemOptions.java
Fri Nov  6 17:37:05 2009
@@ -37,7 +37,7 @@
     /**
      * Keys in the options Map.
      */
-    private final static class FileSystemOptionKey implements Comparable
+    private static final class FileSystemOptionKey implements Comparable
     {
         /** Constant used to create hashcode */
         private static final int HASH = 29;
@@ -165,10 +165,10 @@
     /**
      * {@inheritDoc}
      */
-    public Object clone() {
+    public Object clone()
+    {
         FileSystemOptions clone = new FileSystemOptions();
         clone.options = new TreeMap(options);
         return clone;
     }
-    
 }

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=833480&r1=833479&r2=833480&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
Fri Nov  6 17:37:05 2009
@@ -72,7 +72,8 @@
             return type != null ? type.hashCode() : 0;
         }
 
-        public String toString() {
+        public String toString()
+        {
             return type;
         }
     }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpClientFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpClientFactory.java?rev=833480&r1=833479&r2=833480&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpClientFactory.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpClientFactory.java
Fri Nov  6 17:37:05 2009
@@ -31,7 +31,7 @@
 import org.apache.commons.vfs.util.UserAuthenticatorUtils;
 
 /**
- * Create a HttpClient instance
+ * Create a HttpClient instance.
  *
  * @author <a href="mailto:imario@apache.org">Mario Ivankovits</a>
  * @version $Revision$ $Date$
@@ -52,6 +52,14 @@
 
     /**
      * Creates a new connection to the server.
+     * @param builder The HttpFileSystemConfigBuilder.
+     * @param scheme The protocol.
+     * @param hostname The hostname.
+     * @param username The username.
+     * @param password The password
+     * @param fileSystemOptions The file system options.
+     * @return a new HttpClient connection.
+     * @throws FileSystemException if an error occurs.
      */
     public static HttpClient createConnection(HttpFileSystemConfigBuilder builder, String
scheme,
                                               String hostname, int port, String username,
@@ -82,7 +90,8 @@
                 UserAuthenticator proxyAuth = builder.getProxyAuthenticator(fileSystemOptions);
                 if (proxyAuth != null)
                 {
-                    UserAuthenticationData authData = UserAuthenticatorUtils.authenticate(proxyAuth,
new UserAuthenticationData.Type[]
+                    UserAuthenticationData authData = UserAuthenticatorUtils.authenticate(proxyAuth,
+                        new UserAuthenticationData.Type[]
                         {
                             UserAuthenticationData.USERNAME,
                             UserAuthenticationData.PASSWORD
@@ -92,8 +101,10 @@
                     {
                         final UsernamePasswordCredentials proxyCreds =
                             new UsernamePasswordCredentials(
-                                UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData,
UserAuthenticationData.USERNAME, null)),
-                                UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData,
UserAuthenticationData.PASSWORD, null)));
+                                UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData,
+                                    UserAuthenticationData.USERNAME, null)),
+                                UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData,
+                                    UserAuthenticationData.PASSWORD, null)));
 
                         client.getState().setProxyCredentials(null, proxyHost, proxyCreds);
                     }
@@ -131,4 +142,4 @@
 
         return client;
     }
-}
\ No newline at end of file
+}

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileContentInfoFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileContentInfoFactory.java?rev=833480&r1=833479&r2=833480&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileContentInfoFactory.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileContentInfoFactory.java
Fri Nov  6 17:37:05 2009
@@ -26,7 +26,7 @@
 import org.apache.commons.vfs.impl.DefaultFileContentInfo;
 
 /**
- * Description
+ * Creates the FileContentInfo.
  *
  * @author <a href="mailto:imario@apache.org">Mario Ivankovits</a>
  * @version $Revision$ $Date$

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileNameParser.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileNameParser.java?rev=833480&r1=833479&r2=833480&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileNameParser.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileNameParser.java
Fri Nov  6 17:37:05 2009
@@ -21,10 +21,12 @@
 
 /**
  * Implementation for http. set default port to 80
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
+ * @version $Revision$
  */
 public class HttpFileNameParser extends URLFileNameParser
 {
-    private final static HttpFileNameParser INSTANCE = new HttpFileNameParser();
+    private static final HttpFileNameParser INSTANCE = new HttpFileNameParser();
 
     public HttpFileNameParser()
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileObject.java?rev=833480&r1=833479&r2=833480&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileObject.java
Fri Nov  6 17:37:05 2009
@@ -24,11 +24,17 @@
 import org.apache.commons.httpclient.methods.HeadMethod;
 import org.apache.commons.httpclient.util.DateParser;
 import org.apache.commons.httpclient.util.URIUtil;
-import org.apache.commons.vfs.*;
+
 import org.apache.commons.vfs.provider.AbstractFileObject;
 import org.apache.commons.vfs.provider.URLFileName;
 import org.apache.commons.vfs.util.MonitorInputStream;
 import org.apache.commons.vfs.util.RandomAccessMode;
+import org.apache.commons.vfs.FileName;
+import org.apache.commons.vfs.FileType;
+import org.apache.commons.vfs.FileSystemException;
+import org.apache.commons.vfs.FileNotFoundException;
+import org.apache.commons.vfs.RandomAccessContent;
+import org.apache.commons.vfs.FileContentInfoFactory;
 
 import java.io.IOException;
 import java.io.InputStream;

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileSystem.java?rev=833480&r1=833479&r2=833480&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileSystem.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileSystem.java
Fri Nov  6 17:37:05 2009
@@ -40,7 +40,8 @@
 {
     private final HttpClient client;
 
-    protected HttpFileSystem(final GenericFileName rootName, final HttpClient client, final
FileSystemOptions fileSystemOptions)
+    protected HttpFileSystem(final GenericFileName rootName, final HttpClient client,
+                             final FileSystemOptions fileSystemOptions)
     {
         super(rootName, null, fileSystemOptions);
         this.client = client;

Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/VerifyingFileSelector.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/VerifyingFileSelector.java?rev=833480&r1=833479&r2=833480&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/VerifyingFileSelector.java
(original)
+++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/VerifyingFileSelector.java
Fri Nov  6 17:37:05 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -129,7 +129,7 @@
         else
         {
             final FileInfo child = (FileInfo) currentFolderInfo.children.get(baseName);
-            assertNotNull(child);
+            assertNotNull("Could not locate child " + baseName, child);
             return child;
         }
     }



Mime
View raw message