You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by rg...@apache.org on 2010/01/02 21:03:09 UTC

svn commit: r895278 [1/2] - in /commons/proper/vfs/trunk: ./ core/ core/src/main/java/org/apache/commons/vfs/provider/bzip2/ core/src/main/java/org/apache/commons/vfs/provider/ftp/ core/src/main/java/org/apache/commons/vfs/provider/http/ core/src/main/...

Author: rgoers
Date: Sat Jan  2 20:02:29 2010
New Revision: 895278

URL: http://svn.apache.org/viewvc?rev=895278&view=rev
Log:
Fix more checkstyle errors. Got site:stage-deploy working by using snapshot version of site plugin.

Modified:
    commons/proper/vfs/trunk/checkstyle.xml
    commons/proper/vfs/trunk/core/pom.xml
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/CBZip2InputStream.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/CRC.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/ftp/FtpFileSystemConfigBuilder.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/HttpFileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileSystemConfigBuilder.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpRandomAccessContent.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/ThreadLocalHttpConnectionManager.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/https/HttpsFileNameParser.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarFileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarFileSystem.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/local/DefaultLocalFileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/GenericFileNameParser.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/LocalFileName.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/LocalFileNameParser.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/LocalFileRandomAccessContent.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/WindowsFileName.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileData.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/RamFileOutputStream.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileProvider.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/RamFileSystem.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/res/ResourceFileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/res/ResourceFileSystemConfigBuilder.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpClientFactory.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileNameParser.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileSystem.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileSystemConfigBuilder.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpRandomAccessContent.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/tar/TarBuffer.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/tar/TarConstants.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/tar/TarEntry.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/tar/TarFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/tar/TarFileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/tar/TarFileSystem.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/tar/TarUtils.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/tar/Tbz2FileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/tar/TgzFileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/temp/TemporaryFileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/url/UrlFileName.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/provider/url/UrlFileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/zip/ZipFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/zip/ZipFileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/zip/ZipFileSystem.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/tasks/AbstractSyncTask.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/tasks/CopyTask.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/tasks/DeleteTask.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/tasks/MkdirTask.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/tasks/MoveTask.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/tasks/ShowFileTask.java
    commons/proper/vfs/trunk/pom.xml
    commons/proper/vfs/trunk/xdocs/download.xml

Modified: commons/proper/vfs/trunk/checkstyle.xml
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/checkstyle.xml?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/checkstyle.xml (original)
+++ commons/proper/vfs/trunk/checkstyle.xml Sat Jan  2 20:02:29 2010
@@ -96,7 +96,10 @@
         <module name="EmptyForIteratorPad"/>
         <module name="NoWhitespaceAfter"/>
         <module name="NoWhitespaceBefore"/>
-        <module name="OperatorWrap"/>
+        <module name="OperatorWrap">
+           <property name="tokens" value="ASSIGN"/>
+           <property name="option" value="eol"/>
+        </module>
         <module name="ParenPad"/>
         <module name="TabCharacter"/>
         <module name="WhitespaceAfter"/>
@@ -145,7 +148,7 @@
         <module name="SuperClone"/>
         <module name="SuperFinalize"/>
         <module name="DeclarationOrder"/>
-        <module name="ExplicitInitialization"/>
+        <!-- <module name="ExplicitInitialization"/> -->
         <module name="DefaultComesLast"/>
         <module name="FallThrough"/>
         <module name="MultipleVariableDeclarations"/>

Modified: commons/proper/vfs/trunk/core/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/pom.xml?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/pom.xml (original)
+++ commons/proper/vfs/trunk/core/pom.xml Sat Jan  2 20:02:29 2010
@@ -7,9 +7,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.
@@ -63,11 +63,6 @@
       <optional>true</optional>
     </dependency>
     <dependency>
-      <groupId>org.jdom</groupId>
-      <artifactId>jdom</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
       <groupId>commons-httpclient</groupId>
       <artifactId>commons-httpclient</artifactId>
     </dependency>

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileProvider.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileProvider.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileProvider.java Sat Jan  2 20:02:29 2010
@@ -36,6 +36,7 @@
  */
 public class Bzip2FileProvider extends CompressedFileFileProvider
 {
+    /** The provider's capabilities */
     protected static final Collection capabilities =
             Collections.unmodifiableCollection(Arrays.asList(new Capability[]
                     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/CBZip2InputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/CBZip2InputStream.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/CBZip2InputStream.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/CBZip2InputStream.java Sat Jan  2 20:02:29 2010
@@ -495,7 +495,7 @@
                     {
                         s = s + (0 + 1) * N;
                     }
-                    else// if( nextSym == RUNB )
+                    else // if( nextSym == RUNB )
                     {
                         s = s + (1 + 1) * N;
                     }
@@ -644,6 +644,7 @@
             }
             catch (IOException e)
             {
+                // Ignore the exception.
             }
         }
         m_input = null;

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/CRC.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/CRC.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/CRC.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/CRC.java Sat Jan  2 20:02:29 2010
@@ -115,14 +115,14 @@
         m_globalCrc = 0xffffffff;
     }
 
-    void updateCRC( final int inCh )
+    void updateCRC(final int inCh)
     {
-        int temp = ( m_globalCrc >> 24 ) ^ inCh;
-        if ( temp < 0 )
+        int temp = (m_globalCrc >> 24) ^ inCh;
+        if (temp < 0)
         {
             temp = 256 + temp;
         }
-        m_globalCrc = ( m_globalCrc << 8 ) ^ CRC32_TABLE[ temp ];
+        m_globalCrc = (m_globalCrc << 8) ^ CRC32_TABLE[temp];
     }
 }
 

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=895278&r1=895277&r2=895278&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 Sat Jan  2 20:02:29 2010
@@ -585,7 +585,8 @@
     protected InputStream doGetInputStream() throws Exception
     {
         final FtpClient client = ftpFs.getClient();
-        try {
+        try
+        {
             final InputStream instr = client.retrieveFileStream(relPath);
             // VFS-210
             if (instr == null)
@@ -594,7 +595,8 @@
             }
             return new FtpInputStream(client, instr);
         }
-        catch (Exception e) {
+        catch (Exception e)
+        {
             ftpFs.putClient(client);
             throw e;
         }
@@ -612,7 +614,8 @@
         throws Exception
     {
         final FtpClient client = ftpFs.getClient();
-        try {
+        try
+        {
             OutputStream out = null;
             if (bAppend)
             {
@@ -634,7 +637,8 @@
 
             return new FtpOutputStream(client, out);
         }
-        catch (Exception e) {
+        catch (Exception e)
+        {
             ftpFs.putClient(client);
             throw e;
         }
@@ -648,7 +652,8 @@
     FtpInputStream getInputStream(long filePointer) throws IOException
     {
         final FtpClient client = ftpFs.getClient();
-        try {
+        try
+        {
             final InputStream instr = client.retrieveFileStream(relPath, filePointer);
             if (instr == null)
             {
@@ -660,7 +665,8 @@
             }
             return new FtpInputStream(client, instr);
         }
-        catch (IOException e) {
+        catch (IOException e)
+        {
             ftpFs.putClient(client);
             throw e;
         }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystemConfigBuilder.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystemConfigBuilder.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystemConfigBuilder.java Sat Jan  2 20:02:29 2010
@@ -21,20 +21,20 @@
 import org.apache.commons.vfs.FileSystemOptions;
 
 /**
- * The config builder for various ftp configuration options.
+ * The config BUILDER for various ftp configuration options.
  *
  * @author <a href="mailto:imario@apache.org">Mario Ivankovits</a>
  * @version $Revision$ $Date$
  */
 public final class FtpFileSystemConfigBuilder extends FileSystemConfigBuilder
 {
-    private static final FtpFileSystemConfigBuilder builder = new FtpFileSystemConfigBuilder();
+    private static final FtpFileSystemConfigBuilder BUILDER = new FtpFileSystemConfigBuilder();
 
     private static final String FACTORY_KEY = FTPFileEntryParserFactory.class.getName() + ".KEY";
     private static final String PASSIVE_MODE = FtpFileSystemConfigBuilder.class.getName() + ".PASSIVE";
     private static final String USER_DIR_IS_ROOT = FtpFileSystemConfigBuilder.class.getName() + ".USER_DIR_IS_ROOT";
     private static final String DATA_TIMEOUT = FtpFileSystemConfigBuilder.class.getName() + ".DATA_TIMEOUT";
-    private final static String SO_TIMEOUT = FtpFileSystemConfigBuilder.class.getName() + ".SO_TIMEOUT";
+    private static final String SO_TIMEOUT = FtpFileSystemConfigBuilder.class.getName() + ".SO_TIMEOUT";
 
     private static final String SERVER_LANGUAGE_CODE =
             FtpFileSystemConfigBuilder.class.getName() + ".SERVER_LANGUAGE_CODE";
@@ -54,7 +54,7 @@
 
     public static FtpFileSystemConfigBuilder getInstance()
     {
-        return builder;
+        return BUILDER;
     }
 
     /**
@@ -174,7 +174,8 @@
     }
 
     /**
-     * @param opts
+     * @param opts The FileSystem options.
+     * @return The timeout value.
      * @see #getDataTimeout
      */
     public Integer getSoTimeout(FileSystemOptions opts)
@@ -187,8 +188,8 @@
      * If you set the socketTimeout to <code>null</code> no socketTimeout will be set on the
      * ftp client.
      *
-     * @param opts
-     * @param soTimeout
+     * @param opts The FileSystem options.
+     * @param soTimeout The timeout value.
      */
     public void setSoTimeout(FileSystemOptions opts, Integer soTimeout)
     {

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=895278&r1=895277&r2=895278&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 Sat Jan  2 20:02:29 2010
@@ -36,7 +36,7 @@
  * @author <a href="mailto:imario@apache.org">Mario Ivankovits</a>
  * @version $Revision$ $Date$
  */
-public class HttpClientFactory
+public final class HttpClientFactory
 {
     private HttpClientFactory()
     {
@@ -55,6 +55,7 @@
      * @param builder The HttpFileSystemConfigBuilder.
      * @param scheme The protocol.
      * @param hostname The hostname.
+     * @param port The port number.
      * @param username The username.
      * @param password The password
      * @param fileSystemOptions The file system options.

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileProvider.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileProvider.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileProvider.java Sat Jan  2 20:02:29 2010
@@ -42,7 +42,13 @@
 public class HttpFileProvider
     extends AbstractOriginatingFileProvider
 {
-    final static Collection capabilities = Collections.unmodifiableCollection(Arrays.asList(new Capability[]
+    /** Authenticator information. */
+    public static final UserAuthenticationData.Type[] AUTHENTICATOR_TYPES = new UserAuthenticationData.Type[]
+        {
+            UserAuthenticationData.USERNAME, UserAuthenticationData.PASSWORD
+        };
+
+    static final Collection capabilities = Collections.unmodifiableCollection(Arrays.asList(new Capability[]
     {
         Capability.GET_TYPE,
         Capability.READ_CONTENT,
@@ -53,11 +59,6 @@
         Capability.DIRECTORY_READ_CONTENT,
     }));
 
-    public final static UserAuthenticationData.Type[] AUTHENTICATOR_TYPES = new UserAuthenticationData.Type[]
-        {
-            UserAuthenticationData.USERNAME, UserAuthenticationData.PASSWORD
-        };
-
     public HttpFileProvider()
     {
         super();
@@ -83,8 +84,10 @@
                 rootName.getScheme(),
                 rootName.getHostName(),
                 rootName.getPort(),
-                UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(rootName.getUserName()))),
-                UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(rootName.getPassword()))),
+                UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData,
+                    UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(rootName.getUserName()))),
+                UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData,
+                    UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(rootName.getPassword()))),
                 fileSystemOptions);
         }
         finally

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileSystemConfigBuilder.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileSystemConfigBuilder.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileSystemConfigBuilder.java Sat Jan  2 20:02:29 2010
@@ -23,19 +23,14 @@
 import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
 
 /**
- * Configuration options for HTTP
+ * Configuration options for HTTP.
  *
  * @author <a href="mailto:imario@apache.org">Mario Ivankovits</a>
  * @version $Revision$ $Date$
  */
 public class HttpFileSystemConfigBuilder extends FileSystemConfigBuilder
 {
-    private final static HttpFileSystemConfigBuilder builder = new HttpFileSystemConfigBuilder();
-
-    public static HttpFileSystemConfigBuilder getInstance()
-    {
-        return builder;
-    }
+    private static final HttpFileSystemConfigBuilder BUILDER = new HttpFileSystemConfigBuilder();
 
     private static final int DEFAULT_MAX_HOST_CONNECTIONS = 5;
 
@@ -51,9 +46,15 @@
         super("http.");
     }
 
+    public static HttpFileSystemConfigBuilder getInstance()
+    {
+        return BUILDER;
+    }
+
     /**
-     * Set the charset used for url encoding<br>
+     * Set the charset used for url encoding.<br>
      *
+     * @param opts The FileSystem options.
      * @param chaset the chaset
      */
     public void setUrlCharset(FileSystemOptions opts, String chaset)
@@ -62,8 +63,9 @@
     }
 
     /**
-     * Set the charset used for url encoding<br>
+     * Set the charset used for url encoding.<br>
      *
+     * @param opts The FileSystem options.
      * @return the chaset
      */
     public String getUrlCharset(FileSystemOptions opts)
@@ -73,8 +75,9 @@
 
     /**
      * Set the proxy to use for http connection.<br>
-     * You have to set the ProxyPort too if you would like to have the proxy relly used.
+     * You have to set the ProxyPort too if you would like to have the proxy really used.
      *
+     * @param opts The FileSystem options.
      * @param proxyHost the host
      * @see #setProxyPort
      */
@@ -84,9 +87,10 @@
     }
 
     /**
-     * Set the proxy-port to use for http connection
-     * You have to set the ProxyHost too if you would like to have the proxy relly used.
+     * Set the proxy-port to use for http connection.
+     * You have to set the ProxyHost too if you would like to have the proxy really used.
      *
+     * @param opts The FileSystem options.
      * @param proxyPort the port
      * @see #setProxyHost
      */
@@ -96,9 +100,10 @@
     }
 
     /**
-     * Get the proxy to use for http connection
-     * You have to set the ProxyPort too if you would like to have the proxy relly used.
+     * Get the proxy to use for http connection.
+     * You have to set the ProxyPort too if you would like to have the proxy really used.
      *
+     * @param opts The FileSystem options.
      * @return proxyHost
      * @see #setProxyPort
      */
@@ -108,9 +113,10 @@
     }
 
     /**
-     * Get the proxy-port to use for http the connection
-     * You have to set the ProxyHost too if you would like to have the proxy relly used.
+     * Get the proxy-port to use for http the connection.
+     * You have to set the ProxyHost too if you would like to have the proxy really used.
      *
+     * @param opts The FileSystem options.
      * @return proxyPort: the port number or 0 if it is not set
      * @see #setProxyHost
      */
@@ -120,7 +126,9 @@
     }
 
     /**
-     * Set the proxy authenticator where the system should get the credentials from
+     * Set the proxy authenticator where the system should get the credentials from.
+     * @param opts The FileSystem options.
+     * @param authenticator The UserAuthenticator.
      */
     public void setProxyAuthenticator(FileSystemOptions opts, UserAuthenticator authenticator)
     {
@@ -128,7 +136,9 @@
     }
 
     /**
-     * Get the proxy authenticator where the system should get the credentials from
+     * Get the proxy authenticator where the system should get the credentials from.
+     * @param opts The FileSystem options.
+     * @return The UserAuthenticator.
      */
     public UserAuthenticator getProxyAuthenticator(FileSystemOptions opts)
     {
@@ -136,7 +146,9 @@
     }
 
     /**
-     * The cookies to add to the reqest
+     * The cookies to add to the request.
+     * @param opts The FileSystem options.
+     * @param cookies An array of Cookies.
      */
     public void setCookies(FileSystemOptions opts, Cookie[] cookies)
     {
@@ -144,7 +156,9 @@
     }
 
     /**
-     * The cookies to add to the reqest
+     * The cookies to add to the request.
+     * @param opts The FileSystem options.
+     * @return the Cookie array.
      */
     public Cookie[] getCookies(FileSystemOptions opts)
     {
@@ -152,7 +166,9 @@
     }
 
     /**
-     * The maximum number of connections allowed
+     * The maximum number of connections allowed.
+     * @param opts The FileSystem options.
+     * @param maxTotalConnections The maximum number of connections.
      */
     public void setMaxTotalConnections(FileSystemOptions opts, int maxTotalConnections)
     {
@@ -170,7 +186,9 @@
     }
 
     /**
-     * The maximum number of connections allowed to any host
+     * The maximum number of connections allowed to any host.
+     * @param opts The FileSystem options.
+     * @param maxHostConnections The maximum number of connections to a host.
      */
     public void setMaxConnectionsPerHost(FileSystemOptions opts, int maxHostConnections)
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpRandomAccessContent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpRandomAccessContent.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpRandomAccessContent.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpRandomAccessContent.java Sat Jan  2 20:02:29 2010
@@ -27,12 +27,17 @@
 import java.io.IOException;
 import java.net.HttpURLConnection;
 
+/**
+ * RandomAccess content using Http.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
+ */
 class HttpRandomAccessContent extends AbstractRandomAccessStreamContent
 {
+    protected long filePointer = 0;
+
     private final HttpFileObject fileObject;
     private final HttpFileSystem fileSystem;
 
-    protected long filePointer = 0;
     private DataInputStream dis = null;
     private MonitorInputStream mis = null;
 
@@ -119,22 +124,22 @@
                 return ret;
             }
 
-            public int read(byte b[]) throws IOException
+            public int read(byte[] b) throws IOException
             {
                 int ret = super.read(b);
                 if (ret > -1)
                 {
-                    filePointer+=ret;
+                    filePointer += ret;
                 }
                 return ret;
             }
 
-            public int read(byte b[], int off, int len) throws IOException
+            public int read(byte[] b, int off, int len) throws IOException
             {
                 int ret = super.read(b, off, len);
                 if (ret > -1)
                 {
-                    filePointer+=ret;
+                    filePointer += ret;
                 }
                 return ret;
             }
@@ -158,4 +163,4 @@
     {
         return fileObject.getContent().getSize();
     }
-}
\ No newline at end of file
+}

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/ThreadLocalHttpConnectionManager.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/ThreadLocalHttpConnectionManager.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/ThreadLocalHttpConnectionManager.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/ThreadLocalHttpConnectionManager.java Sat Jan  2 20:02:29 2010
@@ -42,10 +42,26 @@
 public class ThreadLocalHttpConnectionManager implements HttpConnectionManager
 {
     /**
+     * The thread data.
+     */
+    protected ThreadLocal localHttpConnection = new ThreadLocal()
+    {
+        protected Object initialValue()
+        {
+            return new Entry();
+        }
+    };
+
+    /**
      * Collection of parameters associated with this connection manager.
      */
     private HttpConnectionManagerParams params = new HttpConnectionManagerParams();
 
+
+    public ThreadLocalHttpConnectionManager()
+    {
+    }
+
     /**
      * Since the same connection is about to be reused, make sure the
      * previous request was completely processed, and if not
@@ -72,18 +88,7 @@
     }
 
     /**
-     * The thread data
-     */
-    protected ThreadLocal localHttpConnection = new ThreadLocal()
-    {
-        protected Object initialValue()
-        {
-            return new Entry();
-        }
-    };
-
-    /**
-     * release the connection of the current thread
+     * release the connection of the current thread.
      */
     public void releaseLocalConnection()
     {
@@ -93,10 +98,13 @@
         }
     }
 
+    /**
+     * A connection entry.
+     */
     private static class Entry
     {
         /**
-         * The http connection
+         * The http connection.
          */
         private HttpConnection conn = null;
 
@@ -104,10 +112,10 @@
          * The time the connection was made idle.
          */
         private long idleStartTime = Long.MAX_VALUE;
-    }
 
-    public ThreadLocalHttpConnectionManager()
-    {
+        private Entry()
+        {
+        }
     }
 
     protected HttpConnection getLocalHttpConnection()
@@ -131,6 +139,8 @@
     }
 
     /**
+     * @param hostConfiguration The host configuration.
+     * @return the HttpConnection.
      * @see HttpConnectionManager#getConnection(org.apache.commons.httpclient.HostConfiguration)
      */
     public HttpConnection getConnection(HostConfiguration hostConfiguration)
@@ -162,6 +172,9 @@
     }
 
     /**
+     * @param hostConfiguration The host configuration.
+     * @param timeout The timeout value.
+     * @return The HttpConnection.
      * @see HttpConnectionManager#getConnection(HostConfiguration, long)
      * @since 3.0
      */
@@ -212,6 +225,9 @@
     }
 
     /**
+     * @param hostConfiguration The host configuration.
+     * @param timeout The timeout value.
+     * @return The HttpConnection.
      * @see HttpConnectionManager#getConnection(HostConfiguration, long)
      * @deprecated Use #getConnectionWithTimeout(HostConfiguration, long)
      */
@@ -222,6 +238,7 @@
     }
 
     /**
+     * @param conn The HttpConnection.
      * @see HttpConnectionManager#releaseConnection(org.apache.commons.httpclient.HttpConnection)
      */
     public void releaseConnection(HttpConnection conn)
@@ -238,6 +255,7 @@
     }
 
     /**
+     * @param idleTimeout The timeout value.
      * @since 3.0
      */
     public void closeIdleConnections(long idleTimeout)

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/https/HttpsFileNameParser.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/https/HttpsFileNameParser.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/https/HttpsFileNameParser.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/https/HttpsFileNameParser.java Sat Jan  2 20:02:29 2010
@@ -20,11 +20,12 @@
 import org.apache.commons.vfs.provider.URLFileNameParser;
 
 /**
- * Implementation for http. set default port to 80
+ * Implementation for https. set default port to 443.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
  */
 public class HttpsFileNameParser extends URLFileNameParser
 {
-    private final static HttpsFileNameParser INSTANCE = new HttpsFileNameParser();
+    private static final HttpsFileNameParser INSTANCE = new HttpsFileNameParser();
 
     public HttpsFileNameParser()
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarFileObject.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarFileObject.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarFileObject.java Sat Jan  2 20:02:29 2010
@@ -39,9 +39,9 @@
  */
 public class JarFileObject extends ZipFileObject
 {
-    private Attributes attributes;
+    private final JarFileSystem fs;
 
-    final JarFileSystem fs;
+    private Attributes attributes;
 
     protected JarFileObject(final FileName name,
                             final ZipEntry entry,

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarFileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarFileProvider.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarFileProvider.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarFileProvider.java Sat Jan  2 20:02:29 2010
@@ -42,7 +42,7 @@
 public class JarFileProvider
     extends ZipFileProvider
 {
-    final static Collection capabilities;
+    static final Collection capabilities;
 
     static
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarFileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarFileSystem.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarFileSystem.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/jar/JarFileSystem.java Sat Jan  2 20:02:29 2010
@@ -194,6 +194,9 @@
     /**
      * Retrives the attribute with the specified name. The default
      * implementation simply throws an exception.
+     * @param attrName The attiribute's name.
+     * @return The value of the attribute.
+     * @throws FileSystemException if an error occurs.
      */
     public Object getAttribute(String attrName) throws FileSystemException
     {

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=895278&r1=895277&r2=895278&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 Sat Jan  2 20:02:29 2010
@@ -129,6 +129,7 @@
         }
         catch (FileSystemException fse)
         {
+            // Ignore the error.
         }
 
         return -1;

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/DefaultLocalFileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/DefaultLocalFileProvider.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/DefaultLocalFileProvider.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/DefaultLocalFileProvider.java Sat Jan  2 20:02:29 2010
@@ -42,7 +42,8 @@
     extends AbstractOriginatingFileProvider
     implements LocalFileProvider
 {
-    public final static Collection capabilities = Collections.unmodifiableCollection(Arrays.asList(new Capability[]
+    /** The provider's capabilities. */
+    public static final Collection capabilities = Collections.unmodifiableCollection(Arrays.asList(new Capability[]
     {
         Capability.CREATE,
         Capability.DELETE,
@@ -76,6 +77,8 @@
 
     /**
      * Determines if a name is an absolute file name.
+     * @param name The file name.
+     * @return true if the name is absolute, false otherwise.
      */
     public boolean isAbsoluteLocalName(final String name)
     {
@@ -84,6 +87,9 @@
 
     /**
      * Finds a local file, from its local name.
+     * @param name The name of the file to locate.
+     * @return the located FileObject.
+     * @throws FileSystemException if an error occurs.
      */
     public FileObject findLocalFile(final String name)
         throws FileSystemException
@@ -97,6 +103,9 @@
 
     /**
      * Finds a local file.
+     * @param file The File to locate.
+     * @return the located FileObject.
+     * @throws FileSystemException if an error occurs.
      */
     public FileObject findLocalFile(final File file)
         throws FileSystemException

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/GenericFileNameParser.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/GenericFileNameParser.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/GenericFileNameParser.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/GenericFileNameParser.java Sat Jan  2 20:02:29 2010
@@ -32,7 +32,7 @@
     private static final GenericFileNameParser INSTANCE = new GenericFileNameParser();
 
     /**
-     * retrieve a instance to this parser
+     * retrieve a instance to this parser.
      *
      * @return the parser
      */

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/LocalFileName.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/LocalFileName.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/LocalFileName.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/LocalFileName.java Sat Jan  2 20:02:29 2010
@@ -41,6 +41,7 @@
 
     /**
      * Returns the root file for this file.
+     * @return The root file name.
      */
     public String getRootFile()
     {
@@ -49,6 +50,9 @@
 
     /**
      * Factory method for creating name instances.
+     * @param path The file path.
+     * @param type The file type.
+     * @return The FileName.
      */
     public FileName createName(final String path, FileType type)
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/LocalFileNameParser.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/LocalFileNameParser.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/LocalFileNameParser.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/LocalFileNameParser.java Sat Jan  2 20:02:29 2010
@@ -33,6 +33,8 @@
 {
     /**
      * Determines if a name is an absolute file name.
+     * @param name The file name.
+     * @return true if the name is absolute, false otherwise.
      */
     public boolean isAbsoluteName(final String name)
     {
@@ -58,7 +60,8 @@
         throws FileSystemException;
 
 
-    public FileName parseUri(final VfsComponentContext context, FileName base, final String filename) throws FileSystemException
+    public FileName parseUri(final VfsComponentContext context, FileName base, final String filename)
+        throws FileSystemException
     {
         final StringBuffer name = new StringBuffer();
 
@@ -89,5 +92,6 @@
             fileType);
     }
 
-    protected abstract FileName createFileName(String scheme, final String rootFile, final String path, final FileType type);
+    protected abstract FileName createFileName(String scheme, final String rootFile, final String path,
+                                               final FileType type);
 }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/LocalFileRandomAccessContent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/LocalFileRandomAccessContent.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/LocalFileRandomAccessContent.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/LocalFileRandomAccessContent.java Sat Jan  2 20:02:29 2010
@@ -36,8 +36,8 @@
 class LocalFileRandomAccessContent extends AbstractRandomAccessContent
 {
     // private final LocalFile localFile;
-    final private RandomAccessFile raf;
-    final private InputStream rafis;
+    private final RandomAccessFile raf;
+    private final InputStream rafis;
 
     LocalFileRandomAccessContent(final File localFile, final RandomAccessMode mode) throws FileSystemException
     {
@@ -71,12 +71,12 @@
                     raf.close();
                 }
 
-                public int read(byte b[]) throws IOException
+                public int read(byte[] b) throws IOException
                 {
                     return raf.read(b);
                 }
 
-                public int read(byte b[], int off, int len) throws IOException
+                public int read(byte[] b, int off, int len) throws IOException
                 {
                     return raf.read(b, off, len);
                 }
@@ -174,12 +174,12 @@
         return raf.skipBytes(n);
     }
 
-    public void readFully(byte b[]) throws IOException
+    public void readFully(byte[] b) throws IOException
     {
         raf.readFully(b);
     }
 
-    public void readFully(byte b[], int off, int len) throws IOException
+    public void readFully(byte[] b, int off, int len) throws IOException
     {
         raf.readFully(b, off, len);
     }
@@ -234,12 +234,12 @@
         raf.writeBoolean(v);
     }
 
-    public void write(byte b[]) throws IOException
+    public void write(byte[] b) throws IOException
     {
         raf.write(b);
     }
 
-    public void write(byte b[], int off, int len) throws IOException
+    public void write(byte[] b, int off, int len) throws IOException
     {
         raf.write(b, off, len);
     }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/WindowsFileName.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/WindowsFileName.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/WindowsFileName.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/local/WindowsFileName.java Sat Jan  2 20:02:29 2010
@@ -37,6 +37,9 @@
 
     /**
      * Factory method for creating name instances.
+     * @param path The file path.
+     * @param type The file type.
+     * @return The FileName.
      */
     public FileName createName(final String path, FileType type)
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileData.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileData.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileData.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileData.java Sat Jan  2 20:02:29 2010
@@ -26,22 +26,23 @@
 import org.apache.commons.vfs.FileType;
 
 /**
- * RAM File Object Data
+ * RAM File Object Data.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
  */
 class RamFileData implements Serializable
 {
     /**
-     * File Name
+     * File Name.
      */
     private FileName name;
 
     /**
-     * File Type
+     * File Type.
      */
     private FileType type;
 
     /**
-     * Bytes
+     * Bytes.
      */
     private byte[] buffer;
 
@@ -56,7 +57,8 @@
     private Collection children;
 
     /**
-     * Constructor
+     * Constructor.
+     * @param name The file name.
      */
     public RamFileData(FileName name)
     {
@@ -78,7 +80,7 @@
     }
 
     /**
-     * @param buffer
+     * @param buffer The buffer.
      */
     void setBuffer(byte[] buffer)
     {
@@ -156,9 +158,10 @@
     }
 
     /**
-     * Add a child
+     * Add a child.
      *
-     * @param data
+     * @param data The file data.
+     * @throws FileSystemException if an error occurs.
      */
     void addChild(RamFileData data) throws FileSystemException
     {
@@ -183,10 +186,10 @@
     }
 
     /**
-     * Remove a child
+     * Remove a child.
      *
-     * @param data
-     * @throws FileSystemException
+     * @param data The file data.
+     * @throws FileSystemException if an error occurs.
      */
     void removeChild(RamFileData data) throws FileSystemException
     {
@@ -222,10 +225,12 @@
      */
     public boolean equals(Object o)
     {
-        if (this == o) {
+        if (this == o)
+        {
             return true;
         }
-        if (!(o instanceof RamFileData)){
+        if (!(o instanceof RamFileData))
+        {
             return false;
         }
         RamFileData data = (RamFileData) o;
@@ -258,7 +263,7 @@
     /**
      * Resize the buffer
      *
-     * @param newSize
+     * @param newSize The new buffer size.
      */
     void resize(int newSize)
     {

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=895278&r1=895277&r2=895278&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 Sat Jan  2 20:02:29 2010
@@ -32,27 +32,23 @@
 /**
  * A RAM File contains a single RAM FileData instance, it provides methods to
  * access the data by implementing FileObject interface.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
  */
 public class RamFileObject extends AbstractFileObject implements FileObject
 {
     /**
-     * File System
+     * File System.
      */
-    RamFileSystem fs;
+    private RamFileSystem fs;
 
     /**
-     * RAM File Object Data
+     * RAM File Object Data.
      */
     private RamFileData data;
 
-    private void save() throws FileSystemException
-    {
-        this.fs.save(this);
-    }
-
     /**
-     * @param name
-     * @param fs
+     * @param name The name of the file.
+     * @param fs The FileSystem.
      */
     protected RamFileObject(FileName name, RamFileSystem fs)
     {
@@ -61,6 +57,11 @@
         this.fs.attach(this);
     }
 
+    private void save() throws FileSystemException
+    {
+        this.fs.save(this);
+    }
+
     /*
      * (non-Javadoc)
      *
@@ -176,7 +177,8 @@
     /*
      * (non-Javadoc)
      *
-     * @see org.apache.commons.vfs.provider.AbstractFileObject#doGetRandomAccessContent(org.apache.commons.vfs.util.RandomAccessMode)
+     * @see org.apache.commons.vfs.provider.AbstractFileObject#doGetRandomAccessContent(
+     *      org.apache.commons.vfs.util.RandomAccessMode)
      */
     protected RandomAccessContent doGetRandomAccessContent(RandomAccessMode mode)
             throws Exception

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileOutputStream.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileOutputStream.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileOutputStream.java Sat Jan  2 20:02:29 2010
@@ -22,27 +22,29 @@
 import org.apache.commons.vfs.FileSystemException;
 
 /**
- * OutputStream to a RamFile
+ * OutputStream to a RamFile.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
  */
 public class RamFileOutputStream extends OutputStream
 {
 
     /**
-     * File
+     * File.
      */
     protected RamFileObject file;
 
     /**
-     * buffer
+     * buffer.
      */
-    protected byte buffer1[] = new byte[1];
+    protected byte[] buffer1 = new byte[1];
 
+    /** File is open or closed */
     protected boolean closed = false;
 
     private IOException exc;
 
     /**
-     * @param file
+     * @param file The base file.
      */
     public RamFileOutputStream(RamFileObject file)
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileProvider.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileProvider.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileProvider.java Sat Jan  2 20:02:29 2010
@@ -29,25 +29,28 @@
 import org.apache.commons.vfs.provider.FileProvider;
 
 /**
- * RAM File Provider
+ * RAM File Provider.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
+ *
  */
 public class RamFileProvider extends AbstractOriginatingFileProvider implements
         FileProvider
 {
-
-    public final static Collection capabilities = Collections
+    /** The provider's capabilities. */
+    public static final Collection capabilities = Collections
             .unmodifiableCollection(Arrays.asList(new Capability[]
-            { Capability.CREATE, Capability.DELETE, Capability.RENAME,
+            {Capability.CREATE, Capability.DELETE, Capability.RENAME,
                     Capability.GET_TYPE, Capability.GET_LAST_MODIFIED,
                     Capability.SET_LAST_MODIFIED_FILE,
                     Capability.SET_LAST_MODIFIED_FOLDER,
                     Capability.LIST_CHILDREN, Capability.READ_CONTENT,
                     Capability.URI, Capability.WRITE_CONTENT,
                     Capability.APPEND_CONTENT, Capability.RANDOM_ACCESS_READ,
-                    Capability.RANDOM_ACCESS_WRITE }));
+                    Capability.RANDOM_ACCESS_WRITE
+            }));
 
     /**
-     * Constructor
+     * Constructor.
      */
     public RamFileProvider()
     {
@@ -57,8 +60,8 @@
     /*
      * (non-Javadoc)
      *
-     * @see org.apache.commons.vfs.provider.AbstractOriginatingFileProvider#doCreateFileSystem(org.apache.commons.vfs.FileName,
-     *      org.apache.commons.vfs.FileSystemOptions)
+     * @see org.apache.commons.vfs.provider.AbstractOriginatingFileProvider#doCreateFileSystem(
+     *      org.apache.commons.vfs.FileName, org.apache.commons.vfs.FileSystemOptions)
      */
     protected FileSystem doCreateFileSystem(FileName name,
             FileSystemOptions fileSystemOptions) throws FileSystemException

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=895278&r1=895277&r2=895278&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 Sat Jan  2 20:02:29 2010
@@ -27,39 +27,40 @@
 import org.apache.commons.vfs.util.RandomAccessMode;
 
 /**
- * RAM File Random Access Content
+ * RAM File Random Access Content.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
  */
 public class RamFileRandomAccessContent implements RandomAccessContent
 {
     /**
-     * Buffer
+     * File Pointer
      */
-    byte[] buf;
+    protected int filePointer = 0;
 
     /**
-     * File Pointer
+     * Buffer
      */
-    protected int filePointer = 0;
+    private byte[] buf;
 
     /**
      * buffer
      */
-    private byte buffer8[] = new byte[8];
+    private byte[] buffer8 = new byte[8];
 
     /**
      * buffer
      */
-    private byte buffer4[] = new byte[4];
+    private byte[] buffer4 = new byte[4];
 
     /**
      * buffer
      */
-    private byte buffer2[] = new byte[2];
+    private byte[] buffer2 = new byte[2];
 
     /**
      * buffer
      */
-    private byte buffer1[] = new byte[1];
+    private byte[] buffer1 = new byte[1];
 
     /**
      * Mode
@@ -74,7 +75,8 @@
     private InputStream rafis;
 
     /**
-     * @param mode
+     * @param file The file to access.
+     * @param mode The access mode.
      */
     public RamFileRandomAccessContent(RamFileObject file, RandomAccessMode mode)
     {
@@ -107,12 +109,12 @@
             {
             }
 
-            public int read(byte b[]) throws IOException
+            public int read(byte[] b) throws IOException
             {
                 return read(b, 0, b.length);
             }
 
-            public int read(byte b[], int off, int len) throws IOException
+            public int read(byte[] b, int off, int len) throws IOException
             {
                 int retLen = Math.min(len, getLeftBytes());
                 RamFileRandomAccessContent.this.readFully(b, off, retLen);

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileSystem.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileSystem.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ram/RamFileSystem.java Sat Jan  2 20:02:29 2010
@@ -36,7 +36,8 @@
 import org.apache.commons.vfs.provider.AbstractFileSystem;
 
 /**
- * A RAM File System
+ * A RAM File System.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
  */
 public class RamFileSystem extends AbstractFileSystem implements Serializable
 {
@@ -46,8 +47,8 @@
     private Map cache;
 
     /**
-     * @param rootName
-     * @param fileSystemOptions
+     * @param rootName The root file name.
+     * @param fileSystemOptions The FileSystem options.
      */
     protected RamFileSystem(FileName rootName,
             FileSystemOptions fileSystemOptions)
@@ -55,7 +56,7 @@
         super(rootName, null, fileSystemOptions);
         this.cache = Collections.synchronizedMap(new HashMap());
         // create root
-        RamFileData rootData = new RamFileData(rootName) ;
+        RamFileData rootData = new RamFileData(rootName);
         rootData.setType(FileType.FOLDER);
         rootData.setLastModified(System.currentTimeMillis());
         this.cache.put(rootName, rootData);
@@ -83,8 +84,8 @@
     }
 
     /**
-     * @param name
-     * @return children
+     * @param name The name of the file.
+     * @return children The names of the children.
      */
     String[] listChildren(FileName name)
     {
@@ -97,8 +98,8 @@
 
         String[] names = new String[children.size()];
 
-        int pos = 0 ;
-        Iterator iter = children.iterator() ;
+        int pos = 0;
+        Iterator iter = children.iterator();
         while (iter.hasNext())
         {
             RamFileData childData = (RamFileData) iter.next();
@@ -118,7 +119,8 @@
     void delete(RamFileObject file) throws FileSystemException
     {
         // root is read only check
-        if (file.getParent()==null) {
+        if (file.getParent() == null)
+        {
             throw new FileSystemException("unable to delete root");
         }
 
@@ -170,9 +172,9 @@
     }
 
     /**
-     * @param from
-     * @param to
-     * @throws FileSystemException
+     * @param from The original file.
+     * @param to The new file.
+     * @throws FileSystemException if an error occurs.
      */
     void rename(RamFileObject from, RamFileObject to)
             throws FileSystemException
@@ -207,10 +209,10 @@
     }
 
     /**
-     * Import a Tree
+     * Import a Tree.
      *
-     * @param file
-     * @throws FileSystemException
+     * @param file The File
+     * @throws FileSystemException if an error occurs.
      */
     public void importTree(File file) throws FileSystemException
     {
@@ -301,7 +303,7 @@
     }
 
     /**
-     * Close the RAMFileSystem
+     * Close the RAMFileSystem.
      */
     public void close()
     {

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=895278&r1=895277&r2=895278&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 Sat Jan  2 20:02:29 2010
@@ -21,14 +21,15 @@
 
 /**
  * Config Builder for the RAM filesystem.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
  */
-public class RamFileSystemConfigBuilder extends FileSystemConfigBuilder
+public final class RamFileSystemConfigBuilder extends FileSystemConfigBuilder
 {
 
-    /** max size key */
+    /** max size key. */
     private static final String MAX_SIZE_KEY = "maxsize";
 
-    /** config builder singleton */
+    /** config builder singleton. */
     private static RamFileSystemConfigBuilder singleton = new RamFileSystemConfigBuilder();
 
     /**
@@ -56,8 +57,8 @@
     }
 
     /**
-     * @param opts
-     * @return
+     * @param opts The FileSystem options.
+     * @return The maximum size of the file.
      * @see #setMaxSize
      */
     public int getMaxSize(FileSystemOptions opts)
@@ -66,10 +67,10 @@
     }
 
     /**
-     * sets the maximum size of the file system
+     * Sets the maximum size of the file system.
      *
-     * @param opts
-     * @param sizeInBytes
+     * @param opts The FileSystem options.
+     * @param sizeInBytes The maximum file size.
      */
     public void setMaxSize(FileSystemOptions opts, int sizeInBytes)
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/res/ResourceFileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/res/ResourceFileProvider.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/res/ResourceFileProvider.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/res/ResourceFileProvider.java Sat Jan  2 20:02:29 2010
@@ -31,14 +31,15 @@
 import java.util.Collections;
 
 /**
- * Description
+ * The Resource provider.
  *
  * @author <a href="mailto:imario@apache.org">Mario Ivankovits</a>
  * @version $Revision$ $Date$
  */
 public class ResourceFileProvider extends AbstractFileProvider
 {
-    protected final static Collection capabilities = Collections.unmodifiableCollection(Arrays.asList(new Capability[]
+    /** The provider's capabilities */
+    protected static final Collection capabilities = Collections.unmodifiableCollection(Arrays.asList(new Capability[]
     {
         Capability.DISPATCHER
     }));
@@ -50,6 +51,11 @@
 
     /**
      * Locates a file object, by absolute URI.
+     * @param baseFile The base file.
+     * @param uri The URI of the file to locate.
+     * @param fileSystemOptions The FileSystem options.
+     * @return the FileObject.
+     * @throws FileSystemException if an error occurs.
      */
     public FileObject findFile(final FileObject baseFile,
                                final String uri,

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/res/ResourceFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/res/ResourceFileSystemConfigBuilder.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/res/ResourceFileSystemConfigBuilder.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/res/ResourceFileSystemConfigBuilder.java Sat Jan  2 20:02:29 2010
@@ -21,25 +21,26 @@
 import org.apache.commons.vfs.provider.url.UrlFileSystem;
 
 /**
- * The config builder for various ftp configuration options
+ * The config BUILDER for various ftp configuration options.
  *
  * @author <a href="mailto:imario@apache.org">Mario Ivankovits</a>
  * @version $Revision$ $Date$
  */
-public class ResourceFileSystemConfigBuilder extends FileSystemConfigBuilder
+public final class ResourceFileSystemConfigBuilder extends FileSystemConfigBuilder
 {
-    private final static ResourceFileSystemConfigBuilder builder = new ResourceFileSystemConfigBuilder();
+    private static final ResourceFileSystemConfigBuilder BUILDER = new ResourceFileSystemConfigBuilder();
 
-    public static ResourceFileSystemConfigBuilder getInstance()
+    private ResourceFileSystemConfigBuilder()
     {
-        return builder;
+        super("resource.");
     }
 
-    private ResourceFileSystemConfigBuilder()
+    public static ResourceFileSystemConfigBuilder getInstance()
     {
-        super("resource.");
+        return BUILDER;
     }
 
+
     public void setClassLoader(FileSystemOptions opts, ClassLoader classLoader)
     {
         setParam(opts, ClassLoader.class.getName(), classLoader);

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpClientFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpClientFactory.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpClientFactory.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpClientFactory.java Sat Jan  2 20:02:29 2010
@@ -31,12 +31,12 @@
 import java.util.Properties;
 
 /**
- * Create a JSch Session instance
+ * Create a JSch Session instance.
  *
  * @author <a href="mailto:imario@apache.org">Mario Ivankovits</a>
  * @version $Revision$ $Date$
  */
-public class SftpClientFactory
+public final class SftpClientFactory
 {
     private static final String SSH_DIR_NAME = ".ssh";
 
@@ -46,8 +46,16 @@
 
     /**
      * Creates a new connection to the server.
+     * @param hostname The name of the host to connect to.
+     * @param port The port to use.
+     * @param username The user's id.
+     * @param password The user's password.
+     * @param fileSystemOptions The FileSystem options.
+     * @return A Session.
+     * @throws FileSystemException if an error occurs.
      */
-    public static Session createConnection(String hostname, int port, char[] username, char[] password, FileSystemOptions fileSystemOptions) throws FileSystemException
+    public static Session createConnection(String hostname, int port, char[] username, char[] password,
+                                           FileSystemOptions fileSystemOptions) throws FileSystemException
     {
         JSch jsch = new JSch();
 
@@ -65,7 +73,8 @@
             }
             catch (JSchException e)
             {
-                throw new FileSystemException("vfs.provider.sftp/known-hosts.error", knownHostsFile.getAbsolutePath(), e);
+                throw new FileSystemException("vfs.provider.sftp/known-hosts.error",
+                    knownHostsFile.getAbsolutePath(), e);
             }
         }
         else
@@ -84,7 +93,8 @@
                 }
                 catch (JSchException e)
                 {
-                    throw new FileSystemException("vfs.provider.sftp/known-hosts.error", knownHostsFile.getAbsolutePath(), e);
+                    throw new FileSystemException("vfs.provider.sftp/known-hosts.error",
+                        knownHostsFile.getAbsolutePath(), e);
                 }
             }
         }
@@ -152,7 +162,8 @@
             Properties config = new Properties();
 
             //set StrictHostKeyChecking property
-            String strictHostKeyChecking = SftpFileSystemConfigBuilder.getInstance().getStrictHostKeyChecking(fileSystemOptions);
+            String strictHostKeyChecking =
+                SftpFileSystemConfigBuilder.getInstance().getStrictHostKeyChecking(fileSystemOptions);
             if (strictHostKeyChecking != null)
             {
                 config.setProperty("StrictHostKeyChecking", strictHostKeyChecking);
@@ -160,9 +171,9 @@
             //set PreferredAuthentications property
             String preferredAuthentications = SftpFileSystemConfigBuilder.getInstance().
             getPreferredAuthentications(fileSystemOptions);
-            if(preferredAuthentications!=null)
+            if (preferredAuthentications != null)
             {
-                config.setProperty("PreferredAuthentications",preferredAuthentications);
+                config.setProperty("PreferredAuthentications", preferredAuthentications);
             }
 
             //set compression property
@@ -177,7 +188,8 @@
             if (proxyHost != null)
             {
                 int proxyPort = SftpFileSystemConfigBuilder.getInstance().getProxyPort(fileSystemOptions);
-                SftpFileSystemConfigBuilder.ProxyType proxyType = SftpFileSystemConfigBuilder.getInstance().getProxyType(fileSystemOptions);
+                SftpFileSystemConfigBuilder.ProxyType proxyType =
+                    SftpFileSystemConfigBuilder.getInstance().getProxyType(fileSystemOptions);
                 Proxy proxy = null;
                 if (SftpFileSystemConfigBuilder.PROXY_HTTP.equals(proxyType))
                 {
@@ -275,4 +287,4 @@
         }
         return new File("");
     }
-}
\ No newline at end of file
+}

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileNameParser.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileNameParser.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileNameParser.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileNameParser.java Sat Jan  2 20:02:29 2010
@@ -21,11 +21,12 @@
 
 
 /**
- * Implementation for sftp. set default port to 22
+ * Implementation for sftp. set default port to 22.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
  */
 public class SftpFileNameParser extends URLFileNameParser
 {
-    private final static SftpFileNameParser INSTANCE = new SftpFileNameParser();
+    private static final SftpFileNameParser INSTANCE = new SftpFileNameParser();
 
     public SftpFileNameParser()
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileObject.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileObject.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileObject.java Sat Jan  2 20:02:29 2010
@@ -20,7 +20,14 @@
 import com.jcraft.jsch.ChannelSftp.LsEntry;
 import com.jcraft.jsch.SftpATTRS;
 import com.jcraft.jsch.SftpException;
-import org.apache.commons.vfs.*;
+import org.apache.commons.vfs.FileName;
+import org.apache.commons.vfs.FileNotFoundException;
+import org.apache.commons.vfs.FileObject;
+import org.apache.commons.vfs.FileSystemException;
+import org.apache.commons.vfs.FileType;
+import org.apache.commons.vfs.NameScope;
+import org.apache.commons.vfs.RandomAccessContent;
+import org.apache.commons.vfs.VFS;
 import org.apache.commons.vfs.provider.AbstractFileObject;
 import org.apache.commons.vfs.provider.UriParser;
 import org.apache.commons.vfs.util.FileObjectUtils;
@@ -447,7 +454,7 @@
     protected InputStream doGetInputStream() throws Exception
     {
         // VFS-113: avoid npe
-        synchronized(fileSystem)
+        synchronized (fileSystem)
         {
             final ChannelSftp channel = fileSystem.getChannel();
             try
@@ -554,22 +561,7 @@
          */
         protected void onClose() throws IOException
         {
-            /*
-            try
-            {
-                final ByteArrayOutputStream outstr = (ByteArrayOutputStream) out;
-                channel.put(new ByteArrayInputStream(outstr.toByteArray()),
-                        relPath);
-            }
-            catch (final SftpException e)
-            {
-                throw new FileSystemException(e);
-            }
-            finally
-            */
-            {
-                fileSystem.putChannel(channel);
-            }
+            fileSystem.putChannel(channel);
         }
     }
 

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileProvider.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileProvider.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileProvider.java Sat Jan  2 20:02:29 2010
@@ -41,7 +41,18 @@
  */
 public class SftpFileProvider extends AbstractOriginatingFileProvider
 {
-    protected final static Collection capabilities = Collections.unmodifiableCollection(Arrays.asList(new Capability[]
+    /** User Information. */
+    public static final String ATTR_USER_INFO = "UI";
+
+    /** Authentication types. */
+    public static final UserAuthenticationData.Type[] AUTHENTICATOR_TYPES =
+        new UserAuthenticationData.Type[]
+            {
+                UserAuthenticationData.USERNAME, UserAuthenticationData.PASSWORD
+            };
+
+    /** The provider's capabilities. */
+    protected static final Collection capabilities = Collections.unmodifiableCollection(Arrays.asList(new Capability[]
     {
         Capability.CREATE,
         Capability.DELETE,
@@ -56,13 +67,6 @@
         Capability.RANDOM_ACCESS_READ
     }));
 
-    public final static String ATTR_USER_INFO = "UI";
-
-    public final static UserAuthenticationData.Type[] AUTHENTICATOR_TYPES = new UserAuthenticationData.Type[]
-        {
-            UserAuthenticationData.USERNAME, UserAuthenticationData.PASSWORD
-        };
-
     // private JSch jSch = new JSch();
 
     public SftpFileProvider()
@@ -74,7 +78,8 @@
     /**
      * Creates a {@link FileSystem}.
      */
-    protected FileSystem doCreateFileSystem(final FileName name, final FileSystemOptions fileSystemOptions) throws FileSystemException
+    protected FileSystem doCreateFileSystem(final FileName name, final FileSystemOptions fileSystemOptions)
+        throws FileSystemException
     {
         // JSch jsch = createJSch(fileSystemOptions);
 
@@ -90,8 +95,10 @@
             session = SftpClientFactory.createConnection(
                 rootName.getHostName(),
                 rootName.getPort(),
-                UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(rootName.getUserName())),
-                UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(rootName.getPassword())),
+                UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME,
+                    UserAuthenticatorUtils.toChar(rootName.getUserName())),
+                UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD,
+                    UserAuthenticatorUtils.toChar(rootName.getPassword())),
                 fileSystemOptions);
         }
         catch (final Exception e)
@@ -123,6 +130,7 @@
 
     /**
      * Initialises the component.
+     * @throws FileSystemException if an error occurs.
      */
     public void init() throws FileSystemException
     {
@@ -137,4 +145,4 @@
     {
         return capabilities;
     }
-}
\ No newline at end of file
+}

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileSystem.java?rev=895278&r1=895277&r2=895278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileSystem.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileSystem.java Sat Jan  2 20:02:29 2010
@@ -87,13 +87,16 @@
             {
                 final GenericFileName rootName = (GenericFileName) getRootName();
 
-                authData = UserAuthenticatorUtils.authenticate(getFileSystemOptions(), SftpFileProvider.AUTHENTICATOR_TYPES);
+                authData = UserAuthenticatorUtils.authenticate(getFileSystemOptions(),
+                    SftpFileProvider.AUTHENTICATOR_TYPES);
 
                 session = SftpClientFactory.createConnection(
                     rootName.getHostName(),
                     rootName.getPort(),
-                    UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(rootName.getUserName())),
-                    UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(rootName.getPassword())),
+                    UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME,
+                        UserAuthenticatorUtils.toChar(rootName.getUserName())),
+                    UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD,
+                        UserAuthenticatorUtils.toChar(rootName.getPassword())),
                     getFileSystemOptions());
             }
             catch (final Exception e)
@@ -124,7 +127,8 @@
                 channel = (ChannelSftp) session.openChannel("sftp");
                 channel.connect();
 
-                Boolean userDirIsRoot = SftpFileSystemConfigBuilder.getInstance().getUserDirIsRoot(getFileSystemOptions());
+                Boolean userDirIsRoot =
+                    SftpFileSystemConfigBuilder.getInstance().getUserDirIsRoot(getFileSystemOptions());
                 String workingDirectory = getRootName().getPath();
                 if (workingDirectory != null && (userDirIsRoot == null || !userDirIsRoot.booleanValue()))
                 {
@@ -134,7 +138,8 @@
                     }
                     catch (SftpException e)
                     {
-                        throw new FileSystemException("vfs.provider.sftp/change-work-directory.error", workingDirectory);
+                        throw new FileSystemException("vfs.provider.sftp/change-work-directory.error",
+                            workingDirectory);
                     }
                 }
             }
@@ -187,7 +192,7 @@
     }
 
     /**
-     * last mod time is only a int and in seconds, thus can be off by 999
+     * last mod time is only a int and in seconds, thus can be off by 999.
      *
      * @return 1000
      */