[
https://issues.apache.org/jira/browse/VFS-279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Simon Legner updated VFS-279:
-----------------------------
Attachment: VFS-279.patch
Problem still persists. To test
{code:java}
final StandardFileSystemManager fs = new StandardFileSystemManager();
fs.setCacheStrategy(CacheStrategy.ON_CALL);
fs.init();
String uri = "jar:/path/to/a/jar.jar!META-INF/MANIFEST.MF";
assert fs.resolveFile(uri, new
FileSystemOptions()).getContent().getSize() > 0;
{code}
I attached Didier's fix as a patch to be applied.
> 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
> 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)