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 2009/11/10 08:21:18 UTC

svn commit: r834373 - in /commons/proper/vfs/trunk: core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileContentInfoFactory.java core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileContentInfoFactory.java xdocs/changes.xml

Author: rgoers
Date: Tue Nov 10 07:21:18 2009
New Revision: 834373

URL: http://svn.apache.org/viewvc?rev=834373&view=rev
Log:
Apply patch for VFS-259

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileContentInfoFactory.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileContentInfoFactory.java
    commons/proper/vfs/trunk/xdocs/changes.xml

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileContentInfoFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileContentInfoFactory.java?rev=834373&r1=834372&r2=834373&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileContentInfoFactory.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/http/HttpFileContentInfoFactory.java Tue Nov 10 07:21:18 2009
@@ -24,6 +24,7 @@
 import org.apache.commons.vfs.FileContentInfoFactory;
 import org.apache.commons.vfs.FileSystemException;
 import org.apache.commons.vfs.impl.DefaultFileContentInfo;
+import org.apache.commons.vfs.util.FileObjectUtils;
 
 /**
  * Creates the FileContentInfo.
@@ -35,7 +36,8 @@
 {
     public FileContentInfo create(FileContent fileContent) throws FileSystemException
     {
-        HttpFileObject httpFile = (HttpFileObject) fileContent.getFile();
+        HttpFileObject httpFile = (HttpFileObject) (FileObjectUtils
+            .getAbstractFileObject(fileContent.getFile()));
 
         String contentType = null;
         String contentEncoding = null;

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileContentInfoFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileContentInfoFactory.java?rev=834373&r1=834372&r2=834373&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileContentInfoFactory.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileContentInfoFactory.java Tue Nov 10 07:21:18 2009
@@ -22,6 +22,7 @@
 import org.apache.commons.vfs.FileSystemException;
 import org.apache.commons.vfs.impl.DefaultFileContentInfo;
 import org.apache.commons.vfs.provider.URLFileName;
+import org.apache.commons.vfs.util.FileObjectUtils;
 import org.apache.jackrabbit.webdav.property.DavProperty;
 import org.apache.jackrabbit.webdav.property.DavPropertyName;
 import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
@@ -37,7 +38,8 @@
 {
     public FileContentInfo create(FileContent fileContent) throws FileSystemException
     {
-        WebdavFileObject file = (WebdavFileObject) fileContent.getFile();
+        WebdavFileObject file = (WebdavFileObject) (FileObjectUtils
+            .getAbstractFileObject(fileContent.getFile()));
 
         String contentType = null;
         String contentEncoding = null;

Modified: commons/proper/vfs/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/xdocs/changes.xml?rev=834373&r1=834372&r2=834373&view=diff
==============================================================================
--- commons/proper/vfs/trunk/xdocs/changes.xml (original)
+++ commons/proper/vfs/trunk/xdocs/changes.xml Tue Nov 10 07:21:18 2009
@@ -23,6 +23,9 @@
 
   <body>
     <release version="2.0" date="in SVN" description="">
+      <action dev="rgoers" type="fix" issue="VFS-259" due-to="Marek Zawirski">
+        Http and Webdav FIleContentInfoFactory: undress to AbstractFileObject before casting
+      </action>
       <action dev="rgoers" type="fix" issue="VFS-261" due-to="Simon Olofsson">
         WebDAV upload corrupts binary files
       </action>