Use a set instead of a map to record methods in class 'MethodGroup'

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: tools
    • None
    • jmh

      I notice there is a field `Map<MethodInvocation, MethodInvocation> methods` in the class `org.openjdk.jmh.generators.core.MethodGroup`. It is used to record all the methods of one group and the key and value of one entry of the map is always the same. From the program's meaning, I think it is good to use a set instead of a map. And this implementation confused the newbie, like me, so that I needed more time to read the related code to confirm its meaning.

      So I propose to change it from a map to a set. I know the `TreeSet` is implemented by using a `TreeMap` internally, but it is clearer about the program's meaning by using a set.

            Assignee:
            Guoxiong Li
            Reporter:
            Guoxiong Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: