commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <>
Subject [jira] Updated: (COLLECTIONS-237) MultiValueMap: behavior of entrySet().iterator() is not the expected one
Date Tue, 13 May 2008 05:12:55 GMT


Henri Yandell updated COLLECTIONS-237:

    Fix Version/s:     (was: 3.3)

#1 gets the vote. On iterator....

Shouldn't the iterator() be returning a flattened iteration of values from all of the contained
ArrayLists; and also be generating ConcurrentModificationException in some fun way?

I don't think this will be simple to implement, so pushing up to 3.4.

> MultiValueMap: behavior of entrySet().iterator() is not the expected one
> ------------------------------------------------------------------------
>                 Key: COLLECTIONS-237
>                 URL:
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Map
>    Affects Versions: 3.2
>            Reporter: Nils Kaiser
>             Fix For: 3.4
> 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.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message