[
https://issues.apache.org/jira/browse/VFS-279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774887#action_12774887
]
Ralph Goers commented on VFS-279:
---------------------------------
Thanks. What I'm concerned about is that doReplicateFile takes a FileObject.
From what I can tell, it is possible to call this method and pass in a
ZipFileObject or HttpFileObject, neither of which extend LocalFileObject and
aren't DecoratedFileObjects? If so, should it work or is throwing a
ClassCastException the correct behavior?
I assume you ran into this and I assume it must have been with a
DecoratedFileObject? I'm interested in that use case as I wonder why it is
desired to replicate the underlying FileObject and not the DecoratedFileObject.
> ClassCastException in LocalFileSystem when using OnCall caching
> ---------------------------------------------------------------
>
> Key: VFS-279
> URL: https://issues.apache.org/jira/browse/VFS-279
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 1.0, 1.1, 2.0
> Reporter: Didier Earith
> Fix For: 1.0, 1.1, 2.0
>
> Attachments: LocalFileSystem.java
>
>
> When using OnCall caching in the file system, there is a ClassCastException
> in the LocalFileSystem#doReplicateFile function.
> To fix the issue, I replaced :
> final LocalFile localFile = (LocalFile) fileObject;
> by
> final LocalFile localFile = (LocalFile)
> FileObjectUtils.getAbstractFileObject(fileObject);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.