Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 57440 invoked from network); 18 Sep 2007 11:04:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Sep 2007 11:04:06 -0000 Received: (qmail 57616 invoked by uid 500); 18 Sep 2007 11:03:56 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 57534 invoked by uid 500); 18 Sep 2007 11:03:56 -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 57525 invoked by uid 99); 18 Sep 2007 11:03:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 04:03:56 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 11:04:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9AF1C71418F for ; Tue, 18 Sep 2007 04:03:43 -0700 (PDT) Message-ID: <33513738.1190113423630.JavaMail.jira@brutus> Date: Tue, 18 Sep 2007 04:03:43 -0700 (PDT) From: "Alan Mehio (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (COLLECTIONS-240) MultiValueMap should implement Serializable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COLLECTIONS-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alan Mehio updated COLLECTIONS-240: ----------------------------------- Priority: Minor (was: Major) I found a bug in the in the method below from a related test class; however, this has been fixed in the latest svn at http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/MultiValueMap.java?revision=560660 public boolean putAll(Object key, Collection values) { if (coll.size() > 0) { coll = createCollection(values.size()); boolean result = coll.addAll(values); // only add if non-zero size to maintain class state getMap().put(key, coll); result = false; // here should be true since collection has been changed // returns true for a none zero one } return result; } Another issue which I have noticed is the code line coll = createCollection(values.size()); the method protected Collection createCollection(int size) { return (Collection) collectionFactory.create(); } does not use the "size"; I am guessing the method signature is left because of backward compatibility It would be nice it we can create the correct size for the ArrayList instead of the default one which is 10 when we add the collection to the newly created ArrrayList as below coll = createCollection(values.size()); boolean result = coll.addAll(values); this will give better code optimization I think MultiValueMap should implement Serializable ( can be serialized) Regards, Alan Mehio > MultiValueMap should implement Serializable > ------------------------------------------- > > Key: COLLECTIONS-240 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-240 > Project: Commons Collections > Issue Type: Bug > Components: Map > Affects Versions: 3.2 > Reporter: Wouter de Vaal > Assignee: Henri Yandell > Priority: Minor > Fix For: 3.3 > > > Collection classes should be serializable as they are frequently used in model classes which need to be serializable, for example in a HttpSession object within a servlet container cluster. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.