Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.0
-
Reviewed
Description
The FsUrlStreamHandlerFactory class uses a plain HashMap for caching.
When the number of inserted values exceeds the the map's load threshold, it triggers a rehash. During this time, a different thread that performs a get operation on a previously inserted key can obtain a null value instead of the actual value associated with that key.
The result is a NPE potentially being thrown when calling FsUrlStreamHandlerFactory#createURLStreamHandler(String protocol) concurrently.