commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1033338 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs: ./ impl/ provider/ftp/ provider/ftps/ provider/http/ provider/ram/ provider/res/ provider/sftp/ provider/webdav/
Date Wed, 10 Nov 2010 02:57:07 GMT
Author: sebb
Date: Wed Nov 10 02:57:07 2010
New Revision: 1033338

URL: http://svn.apache.org/viewvc?rev=1033338&view=rev
Log:
VFS-334 DefaultFileSystemConfigBuilder.getConfigClass() returns DefaultFileSystemConfigBuilder.class
which is not a FileSystem

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemConfigBuilder.java
    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/impl/DefaultFileSystemConfigBuilder.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/ftps/FtpsFileSystemConfigBuilder.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/ram/RamFileSystemConfigBuilder.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/SftpFileSystemConfigBuilder.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileSystemConfigBuilder.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemConfigBuilder.java?rev=1033338&r1=1033337&r2=1033338&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemConfigBuilder.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemConfigBuilder.java
Wed Nov 10 02:57:07 2010
@@ -307,5 +307,5 @@ public abstract class FileSystemConfigBu
         return value;
     }
 
-    protected abstract Class getConfigClass();
+    protected abstract Class<? extends FileSystem> getConfigClass();
 }

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=1033338&r1=1033337&r2=1033338&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
Wed Nov 10 02:57:07 2010
@@ -43,14 +43,14 @@ public final class FileSystemOptions imp
         private static final int HASH = 29;
 
         /** The FileSystem class */
-        private final Class fileSystemClass;
+        private final Class<? extends FileSystem> fileSystemClass;
 
         /** The option name */
         private final String name;
 
         // TODO the parameter name suggests that the class should only be a 
         // a FileSystem, however some of the tests pass in DefaultFileSystemConfigBuilder
-        private FileSystemOptionKey(Class fileSystemClass, String name)
+        private FileSystemOptionKey(Class<? extends FileSystem> fileSystemClass, String
name)
         {
             this.fileSystemClass = fileSystemClass;
             this.name = name;
@@ -106,18 +106,18 @@ public final class FileSystemOptions imp
     {
     }
 
-    void setOption(Class<?> fileSystemClass, String name, Object value)
+    void setOption(Class<? extends FileSystem> fileSystemClass, String name, Object
value)
     {
         options.put(new FileSystemOptionKey(fileSystemClass, name), value);
     }
 
-    Object getOption(Class<?> fileSystemClass, String name)
+    Object getOption(Class<? extends FileSystem> fileSystemClass, String name)
     {
         FileSystemOptionKey key = new FileSystemOptionKey(fileSystemClass, name);
         return options.get(key);
     }
 
-    boolean hasOption(Class<?> fileSystemClass, String name)
+    boolean hasOption(Class<? extends FileSystem> fileSystemClass, String name)
     {
         FileSystemOptionKey key = new FileSystemOptionKey(fileSystemClass, name);
         return options.containsKey(key);

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemConfigBuilder.java?rev=1033338&r1=1033337&r2=1033338&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemConfigBuilder.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemConfigBuilder.java
Wed Nov 10 02:57:07 2010
@@ -16,8 +16,17 @@
  */
 package org.apache.commons.vfs.impl;
 
+import java.io.File;
+
+import org.apache.commons.vfs.Capability;
+import org.apache.commons.vfs.FileListener;
+import org.apache.commons.vfs.FileName;
+import org.apache.commons.vfs.FileObject;
+import org.apache.commons.vfs.FileSelector;
+import org.apache.commons.vfs.FileSystem;
 import org.apache.commons.vfs.FileSystemConfigBuilder;
 import org.apache.commons.vfs.FileSystemException;
+import org.apache.commons.vfs.FileSystemManager;
 import org.apache.commons.vfs.FileSystemOptions;
 import org.apache.commons.vfs.UserAuthenticator;
 
@@ -57,9 +66,15 @@ public class DefaultFileSystemConfigBuil
         return (UserAuthenticator) getParam(opts, "userAuthenticator");
     }
 
+    /**
+     * Dummy class that implements FileSystem.
+     */
+    abstract static class DefaultFileSystem implements FileSystem {    
+    }
+
     @Override
-    protected Class getConfigClass()
+    protected Class<? extends FileSystem> getConfigClass()
     {
-        return DefaultFileSystemConfigBuilder.class;
+        return DefaultFileSystem.class;
     }
 }

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=1033338&r1=1033337&r2=1033338&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
Wed Nov 10 02:57:07 2010
@@ -17,6 +17,7 @@
 package org.apache.commons.vfs.provider.ftp;
 
 import org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory;
+import org.apache.commons.vfs.FileSystem;
 import org.apache.commons.vfs.FileSystemConfigBuilder;
 import org.apache.commons.vfs.FileSystemOptions;
 
@@ -106,7 +107,7 @@ public final class FtpFileSystemConfigBu
     }
 
     @Override
-    protected Class getConfigClass()
+    protected Class<? extends FileSystem> getConfigClass()
     {
         return FtpFileSystem.class;
     }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftps/FtpsFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftps/FtpsFileSystemConfigBuilder.java?rev=1033338&r1=1033337&r2=1033338&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftps/FtpsFileSystemConfigBuilder.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftps/FtpsFileSystemConfigBuilder.java
Wed Nov 10 02:57:07 2010
@@ -17,6 +17,7 @@
 package org.apache.commons.vfs.provider.ftps;
 
 import org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory;
+import org.apache.commons.vfs.FileSystem;
 import org.apache.commons.vfs.FileSystemConfigBuilder;
 import org.apache.commons.vfs.FileSystemOptions;
 import org.apache.commons.vfs.provider.ftp.FtpFileSystem;
@@ -102,7 +103,7 @@ public class FtpsFileSystemConfigBuilder
   }
 
   @Override
-  protected Class getConfigClass() {
+  protected Class<? extends FileSystem> getConfigClass() {
     return FtpFileSystem.class;
   }
 

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=1033338&r1=1033337&r2=1033338&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
Wed Nov 10 02:57:07 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.vfs.provider.http;
 
+import org.apache.commons.vfs.FileSystem;
 import org.apache.commons.vfs.FileSystemConfigBuilder;
 import org.apache.commons.vfs.FileSystemOptions;
 import org.apache.commons.vfs.UserAuthenticator;
@@ -231,7 +232,7 @@ public class HttpFileSystemConfigBuilder
 	}
 
 	@Override
-    protected Class getConfigClass()
+    protected Class<? extends FileSystem> getConfigClass()
     {
         return HttpFileSystem.class;
     }

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=1033338&r1=1033337&r2=1033338&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
Wed Nov 10 02:57:07 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.vfs.provider.ram;
 
+import org.apache.commons.vfs.FileSystem;
 import org.apache.commons.vfs.FileSystemConfigBuilder;
 import org.apache.commons.vfs.FileSystemOptions;
 
@@ -52,7 +53,7 @@ public final class RamFileSystemConfigBu
      * {@inheritDoc}
      */
     @Override
-    protected Class getConfigClass()
+    protected Class<? extends FileSystem> getConfigClass()
     {
         return RamFileSystem.class;
     }

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=1033338&r1=1033337&r2=1033338&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
Wed Nov 10 02:57:07 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.vfs.provider.res;
 
+import org.apache.commons.vfs.FileSystem;
 import org.apache.commons.vfs.FileSystemConfigBuilder;
 import org.apache.commons.vfs.FileSystemOptions;
 import org.apache.commons.vfs.provider.url.UrlFileSystem;
@@ -52,7 +53,7 @@ public final class ResourceFileSystemCon
     }
 
     @Override
-    protected Class getConfigClass()
+    protected Class<? extends FileSystem> getConfigClass()
     {
         return UrlFileSystem.class;
     }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileSystemConfigBuilder.java?rev=1033338&r1=1033337&r2=1033338&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileSystemConfigBuilder.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileSystemConfigBuilder.java
Wed Nov 10 02:57:07 2010
@@ -17,6 +17,8 @@
 package org.apache.commons.vfs.provider.sftp;
 
 import com.jcraft.jsch.UserInfo;
+
+import org.apache.commons.vfs.FileSystem;
 import org.apache.commons.vfs.FileSystemConfigBuilder;
 import org.apache.commons.vfs.FileSystemException;
 import org.apache.commons.vfs.FileSystemOptions;
@@ -262,7 +264,7 @@ public final class SftpFileSystemConfigB
     }
 
     @Override
-    protected Class getConfigClass()
+    protected Class<? extends FileSystem> getConfigClass()
     {
         return SftpFileSystem.class;
     }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileSystemConfigBuilder.java?rev=1033338&r1=1033337&r2=1033338&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileSystemConfigBuilder.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileSystemConfigBuilder.java
Wed Nov 10 02:57:07 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.vfs.provider.webdav;
 
+import org.apache.commons.vfs.FileSystem;
 import org.apache.commons.vfs.FileSystemOptions;
 import org.apache.commons.vfs.provider.http.HttpFileSystemConfigBuilder;
 
@@ -83,7 +84,7 @@ public final class WebdavFileSystemConfi
      * @return The Webdav FileSystem Class object.
      */
     @Override
-    protected Class getConfigClass()
+    protected Class<? extends FileSystem> getConfigClass()
     {
         return WebdavFileSystem.class;
     }



Mime
View raw message