Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.6.0
-
None
-
Reviewed
Description
The method looks up the same key in the same hash map potentially 3 times
if (map.containsKey(key) && fs == map.get(key)) {
map.remove(key)
Instead it could do a single lookup
FileSystem cachedFs = map.remove(key);
and then test cachedFs == fs or something else.