Uploaded image for project: 'Commons Collections'
  1. Commons Collections
  2. COLLECTIONS-237

MultiValueMap: behavior of entrySet().iterator() is not the expected one

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 4.0-alpha1, 4.0
    • Component/s: Map
    • Labels:
      None

      Description

      The entrySet() method of the MultiValueMap delegates the entrySet() call to the decorated map, which is HashMap by default. The default hashmap iterator is used, which causes the iterator to return one Map.Entry for every key. The value returned for the key is an ArrayList, and not the value of the entry which was put into the map.

      The expected behavior would be the iterator to return the whole set of entries in the map, which requires iteration over the different array lists contained in the decorated map.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nika Nils Kaiser
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: