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

Specify that TabularData[Support].keySet() returns Set<List<Object>>

    Details

    • Subcomponent:
    • Resolved In Build:
      b47
    • CPU:
      generic
    • OS:
      generic

      Description

      javax.management.openmbean says for TabularData.keySet() that it returns "a set view of the keys". This is somewhat unclear, but we can interpret it to mean that each element of the set is a tuple containing the index items for one row of the table. However, the form of this tuple is not specified.

      TabularDataSupport.keySet() goes further and says "Each key contained in this set is an umodifiable List". It also says that the set is backed by the table and supports removal -- removing an entry from the set removes the corresponding row in the table.

      At a minimum, TabularData should also say that the set contains List values. The method TabularData.keySet() is unusable as specified because some other implementation of TabularData might decide to make the entries of the set be Object[]. The simplest way to clear up the specification is to define the return type of keySet() to be Set<List<Object>> in both TabularData and TabularDataSupport.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lmalvent Luis-Miguel Alventosa (Inactive)
                Reporter:
                emcmanus Eamonn McManus
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: