You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2012/05/16 16:33:05 UTC

svn commit: r1339187 - in /commons/proper/vfs/trunk: core/src/main/java/org/apache/commons/vfs2/FileContent.java core/src/main/java/org/apache/commons/vfs2/FileObject.java src/changes/changes.xml

Author: ggregory
Date: Wed May 16 14:33:05 2012
New Revision: 1339187

URL: http://svn.apache.org/viewvc?rev=1339187&view=rev
Log:
[VFS-254] Let FileObject and FileContent extend java.io.Closeable.

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileContent.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileObject.java
    commons/proper/vfs/trunk/src/changes/changes.xml

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileContent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileContent.java?rev=1339187&r1=1339186&r2=1339187&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileContent.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileContent.java Wed May 16 14:33:05 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.vfs2;
 
+import java.io.Closeable;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -39,7 +40,7 @@ import org.apache.commons.vfs2.util.Rand
  *
  * @see FileObject#getContent
  */
-public interface FileContent
+public interface FileContent extends Closeable
 {
     /**
      * Returns the file which this is the content of.

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileObject.java?rev=1339187&r1=1339186&r2=1339187&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileObject.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileObject.java Wed May 16 14:33:05 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.vfs2;
 
+import java.io.Closeable;
 import java.net.URL;
 import java.util.Arrays;
 import java.util.Collections;
@@ -77,7 +78,7 @@ import org.apache.commons.vfs2.operation
  * @see FileContent
  * @see FileName
  */
-public interface FileObject extends Comparable<FileObject>, Iterable<FileObject>
+public interface FileObject extends Comparable<FileObject>, Iterable<FileObject>, Closeable
 {
     /**
      * Returns the name of this file.

Modified: commons/proper/vfs/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/src/changes/changes.xml?rev=1339187&r1=1339186&r2=1339187&view=diff
==============================================================================
--- commons/proper/vfs/trunk/src/changes/changes.xml (original)
+++ commons/proper/vfs/trunk/src/changes/changes.xml Wed May 16 14:33:05 2012
@@ -23,8 +23,11 @@
 
   <body>
     <release version="2.1" date="TBD" description="">
+      <action issue="VFS-254" dev="ggregory" type="update" due-to="mzawirski">
+        Let FileObject and FileContent extend java.io.Closeable.
+      </action>
       <action issue="VFS-413" dev="ggregory" type="update" due-to="polivenok">
-        [VFS] No support for FTP servers with non Latin-1 control encoding.
+        [FTP] No support for FTP servers with non Latin-1 control encoding.
       </action>
       <action issue="VFS-252" dev="ggregory" type="update">
         [SMB] SmbFileObject does not support setLastModifiedTime while jcifs supports it.