-
Enhancement
-
Resolution: Fixed
-
P4
-
15
-
b10
Utils.WeakSoftHashMap sounds like a general collection but is specifically an impl of Map<Element,CommentHelper>.
Furthermore, although it declares that it implements Map<Element,CommentHelper>, it is always used explicitly via its class name, and never as a Map. This means that we can determine the methods that are required (get, put, remove, computeIfAbsent) and delete the others.
Finally, it is "just" a memory sensitive cache for CommentHelper objects, and so a better name for the class is just CommentHelperCache.
Furthermore, although it declares that it implements Map<Element,CommentHelper>, it is always used explicitly via its class name, and never as a Map. This means that we can determine the methods that are required (get, put, remove, computeIfAbsent) and delete the others.
Finally, it is "just" a memory sensitive cache for CommentHelper objects, and so a better name for the class is just CommentHelperCache.