Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
VfsTask.resolveFile() publishes a partially constructed static object.
The static "manager" field is created and then updated; this is not thread-safe.
A work-round is to use a temporary variable and then assign it to the static field once init. is complete.
However that is still not thread-safe.
Consider using the "Initialization On Demand Holder" idiom, though this will mean a change to close() as the manager variable would no longer be accessible.
However, it appears that the manager.close() method is re-usable.