You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Falco (Jira)" <ji...@apache.org> on 2019/10/08 15:24:00 UTC

[jira] [Commented] (VFS-733) Parent layer of ZipFileSystem set to null through OnCallRefreshFileObject and DecoratedFileObject.refresh()

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

Falco commented on VFS-733:
---------------------------

[~ggregory] Looks good to me. You may want to un-ignore {{org.apache.commons.vfs2.provider.zip.Jira733TestCase}}, it's passing now.

> Parent layer of ZipFileSystem set to null through OnCallRefreshFileObject and DecoratedFileObject.refresh()
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: VFS-733
>                 URL: https://issues.apache.org/jira/browse/VFS-733
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.2, 2.4, 2.3, 2.4.1
>            Reporter: Falco
>            Priority: Major
>             Fix For: 2.5.0
>
>
> When using {{FileObject#exists}} and {{FileObject#getContent}} on a ZIP file (in any order), the reference to the parent file system is set to {{null}}.
> {code}
> final FileObject zippedFile = new OnCallRefreshFileObject(fileInZip());
> assertNotNull(zippedFile.getFileSystem().getParentLayer());
> zippedFile.exists();
> zippedFile.getContent();
> assertNotNull(zippedFile.getFileSystem().getParentLayer()); // fails
> {code}
> For an executable example, refer to [https://github.com/f4lco/vfs-repro/blob/master/src/test/java/vfs/ZipParentLayerTest.java].
> I come to believe this does not work as intended. I'm also relatively clueless about a potential fix or workaround. For me, this bug blocks upgrading from VFS 2.1.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)