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

Bernd Eckenfels commented on VFS-585:
-------------------------------------

Using the file type (IMAGINARY == non existing) is used by all file providers, 
this is how VFS works: the file type is determined on doAttach and exists() is 
only a helper to check for the type. (Only HdfsFileObject overwrites 
AbstractFileObject#exists() - with basically the same function).

So the problem is more that it does not implement doAttach() and the getType() 
purely works on the file name.

> CompressedFileFileObject should override exists()
> -------------------------------------------------
>
>                 Key: VFS-585
>                 URL: https://issues.apache.org/jira/browse/VFS-585
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Eduard Wirch
>
> {{CompressedFileFileObject}} does not implement {{exists()}}. This leads to 
> inheriting the implementation of {{AbstractFileObject}} which always returns 
> {{true}} if the type is not {{IMAGINARY}}. That's completely useless in 
> production.
> Make {{exists()}} return {{true}} only if the archive and the compressed file 
> exist.
> Alternative: at least existence of the archive should be checked.



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

Reply via email to