Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8238648

Rename and simplify Utils.WeakSoftHashMap

    XMLWordPrintable

    Details

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            jjg Jonathan Gibbons
            Reporter:
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: