commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno P. Kinoshita (Jira)" <>
Subject [jira] [Commented] (VFS-733) Parent layer of ZipFileSystem set to null through OnCallRefreshFileObject
Date Mon, 07 Oct 2019 02:45:00 GMT


Bruno P. Kinoshita commented on VFS-733:

Don't know the component and its codebase well enough to have a good opinion on whether it's
safe to remove it or not. But at least looking at the git blame with GitHub's interface, it
doesn't seem to have been added to fix a security bug.


The commit message seems to be related to GC collection for soft references. But given other
class attributes are not set to null, maybe it that line where parentLayer is set to null
could be removed. I wonder if it could also be made a `private final FileObject` as the `rootName`?


> Parent layer of ZipFileSystem set to null through OnCallRefreshFileObject
> -------------------------------------------------------------------------
>                 Key: VFS-733
>                 URL:
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.2, 2.4, 2.3, 2.4.1
>            Reporter: Falco
>            Priority: Major
> 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 [].
> 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

View raw message