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

Bernd Eckenfels commented on VFS-279:
-------------------------------------

the 
org.apache.commons.vfs2.provider.local.LocalFileSystem.doReplicateFile(FileObject,
 FileSelector) is overwriting the more general case. It looks like it is 
expected that you use the replicate() function of the filesystem your file is 
located on. fileObject.getFilesystem().replicat(fileObject, SELF). Not cleanly 
documented I think. But the patch does at least improve the tolerance a bit.

> 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
>            Assignee: Bernd Eckenfels
>             Fix For: 2.1
>
>         Attachments: LocalFileSystem.java, VFS-279.patch
>
>
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to