Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.4.1
-
None
Description
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()