[ 
https://issues.apache.org/jira/browse/VFS-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14876641#comment-14876641
 ] 

Simon Legner commented on VFS-543:
----------------------------------

Maybe we should throw a {{UnsupportedOperationException}} instead – better than 
returning incorrect results?

{code}
diff --git 
a/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java 
b/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
index a3d5617..beb8e9a 100644
--- 
a/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
+++ 
b/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
@@ -683,4 +683,9 @@ public class SftpFileObject extends 
AbstractFileObject<SftpFileSystem>
         }
     }
 
+    @Override
+    public boolean isContentOpen()
+    {
+        throw new UnsupportedOperationException();
+    }
 }
{code}

> FileObject.isContentOpen is returning false regardless file open or not when 
> remote SFTP is done.
> -------------------------------------------------------------------------------------------------
>
>                 Key: VFS-543
>                 URL: https://issues.apache.org/jira/browse/VFS-543
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: sanjay
>
> FileObject.isContentOpen is returning false regardless file open or not when 
> remote SFTP is done.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to