users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: AbstractMultivaluedMap does not support case insensitive operations

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Fri, 8 Mar 2013 16:44:04 +0100

Hmm... interestingly, in Jersey we've been able to leverage the AbstractMultivaluedMap to accomplish what you wanted to do without running into major issues:
https://github.com/jersey/jersey/blob/master/core-common/src/main/java/org/glassfish/jersey/internal/util/collection/StringKeyIgnoreCaseMultivaluedMap.java

Note that the concrete implementation (MultivaluedHashMap) is there for users of JAX-RS API that sometimes requires MultivaluedMap as an input type. The abstract is there to allow the concrete impl and to help people providing their own custom impls (such as the one above).

Marek

On Mar 8, 2013, at 12:37 PM, Sergey Beryozkin <sberyozkin_at_talend.com> wrote:

> Hi,
>
> I've tried to refactor our MultivaluedMap implementation such that it depends on AbstractMultivaluedMap, but had to give up as it does not really help a lot, it does not help with case-sensitive operations, I wonder how useful it is to ship AbstractMultivaluedMap and MultivaluedHashMap implementations given that for the most cases the maps are expected to be case in-sensitive and sometimes unmodifiable ?
>
> Cheers, Sergey