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?

TP.
-- 
Tom Parker
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to