commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: [collections] ListOrderedMap not respecting underlying list
Date Fri, 10 Jul 2009 02:11:24 GMT
Tom Parker wrote:
> When decorating either CaseInsensitiveMap or IdentityMap (and I believe
> this will impact any java.util.TreeMap built with a non-.equals()
> Comparator), ListOrderedMap responds inconsistently with the underlying
> map.  The ordering seems to be operating off .equals() rather than the
> actual contents of the underlying map.
>
> Using CaseInsensitiveMap:
> OrderedMap m = ListOrderedMap.decorate(new CaseInsensitiveMap());
> m.put("Foo", 1);
> m.put("Bar", 2);
> m.remove("foo");
> //m.firstKey() will return "Foo"
>
> I have JUnit test cases that demonstrate the issue across both
> CaseInsensitiveMap and IdentityMap if that would be helpful.
>   
> Am I missing something?  Should this be raised as a code issue, or a
> documentation enhancement request against ListOrderedMap?
>   
This looks like a bug in ListOrderedMap.  Please open a Jira ticket and 
attach your unit tests.  Thanks for reporting this.

Phil
>   
> TP.
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message