[
https://issues.apache.org/jira/browse/VFS-727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary Gregory resolved VFS-727.
------------------------------
Fix Version/s: 2.4.2
Resolution: Fixed
[~elmuerte]
Thank you for your PRs :)
In git master. Please verify and close.
Gary
> Creation of singleton file system manager from providers
> --------------------------------------------------------
>
> Key: VFS-727
> URL: https://issues.apache.org/jira/browse/VFS-727
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 2.4.1
> Reporter: Michiel Hendriks
> Priority: Major
> Fix For: 2.4.2
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> A lot of file provides have a call to VFS.getManager() in their findFile(...)
> implemention, mostly to strip of the scheme.
> This is bad in two ways.
> 1) it creates a global FileSystemManager if it does not exist yet, and could
> result in an exception because not all default providers can be loaded (e.g.
> no commons http results in class not found exceptions). This obviously also
> introduces a global state.
> 2) the result of VFS.getManager().getSchemes() is not the same as the schemes
> registered in the file system manager that contains the registered provider.
> All calls to VFS.getManager().getSchemes() should be replaced by calls to
> getContext().getFileSystemManager().getSchemes()
--
This message was sent by Atlassian Jira
(v8.3.2#803003)