Michiel Hendriks created VFS-727: ------------------------------------ Summary: 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
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)