Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0B58DFD4E for ; Sat, 27 Apr 2013 11:10:21 +0000 (UTC) Received: (qmail 50826 invoked by uid 500); 27 Apr 2013 11:10:20 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 50407 invoked by uid 500); 27 Apr 2013 11:10:17 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 50366 invoked by uid 99); 27 Apr 2013 11:10:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Apr 2013 11:10:16 +0000 Date: Sat, 27 Apr 2013 11:10:16 +0000 (UTC) From: "Thomas Neidhart (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (COLLECTIONS-237) MultiValueMap: behavior of entrySet().iterator() is not the expected one MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COLLECTIONS-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Neidhart resolved COLLECTIONS-237. ----------------------------------------- Resolution: Fixed In r1476553, I have implemented the #iterator() method as suggested and clarified the javadoc for #entrySet(). The Map.Entry objects returned by iterator() do not support setValue(Object), but I guess this is ok for now. > MultiValueMap: behavior of entrySet().iterator() is not the expected one > ------------------------------------------------------------------------ > > Key: COLLECTIONS-237 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-237 > Project: Commons Collections > Issue Type: Bug > Components: Map > Affects Versions: 3.2 > Reporter: Nils Kaiser > Fix For: 4.0 > > > 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. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira