commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1364684 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider: http/HttpFileObject.java webdav/WebdavFileObject.java
Date Mon, 23 Jul 2012 15:35:51 GMT
Author: ggregory
Date: Mon Jul 23 15:35:51 2012
New Revision: 1364684

URL: http://svn.apache.org/viewvc?rev=1364684&view=rev
Log:
[VFS-429] Remove extra FileSystem ivar in AbstractFileObject subclasses with generics.

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java?rev=1364684&r1=1364683&r2=1364684&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java
Mon Jul 23 15:35:51 2012
@@ -41,22 +41,24 @@ import org.apache.commons.vfs2.util.Moni
 import org.apache.commons.vfs2.util.RandomAccessMode;
 
 /**
- * A file object backed by commons httpclient.
+ * A file object backed by Apache Commons HttpClient.
+ * 
+ * @param <FS> An {@link HttpFileSystem} subclass
  *
  * @todo status codes
  */
-public class HttpFileObject extends AbstractFileObject<HttpFileSystem>
+public class HttpFileObject<FS extends HttpFileSystem> extends AbstractFileObject<FS>
 {
     private final String urlCharset;
     private final boolean followRedirect;
     private HeadMethod method;
 
-    protected HttpFileObject(final AbstractFileName name, final HttpFileSystem fileSystem)
+    protected HttpFileObject(final AbstractFileName name, final FS fileSystem)
     {
         this(name, fileSystem, HttpFileSystemConfigBuilder.getInstance());
     }
 
-    protected HttpFileObject(final AbstractFileName name, final HttpFileSystem fileSystem,
final HttpFileSystemConfigBuilder builder)
+    protected HttpFileObject(final AbstractFileName name, final FS fileSystem, final HttpFileSystemConfigBuilder
builder)
     {
         super(name, fileSystem);
         final FileSystemOptions fileSystemOptions = fileSystem.getFileSystemOptions();

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java?rev=1364684&r1=1364683&r2=1364684&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java
Mon Jul 23 15:35:51 2012
@@ -39,7 +39,6 @@ import org.apache.commons.vfs2.FileNotFo
 import org.apache.commons.vfs2.FileNotFoundException;
 import org.apache.commons.vfs2.FileObject;
 import org.apache.commons.vfs2.FileSystemException;
-import org.apache.commons.vfs2.FileSystemOptions;
 import org.apache.commons.vfs2.FileType;
 import org.apache.commons.vfs2.NameScope;
 import org.apache.commons.vfs2.provider.AbstractFileName;
@@ -78,7 +77,7 @@ import org.w3c.dom.Node;
  *
  * @since 2.0
  */
-public class WebdavFileObject extends HttpFileObject
+public class WebdavFileObject extends HttpFileObject<WebdavFileSystem>
 {
     /** The character set property name. */
     public static final DavPropertyName RESPONSE_CHARSET = DavPropertyName.create(



Mime
View raw message