jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Extending MultivaluedMap interface?

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Sat, 16 Jun 2012 01:16:38 +0200

Hello experts,

I would like to introduce a collection of useful new methods into the multivalued map interface (those methods are readily available on the AbstractMultivaluedMap implementation class in the API and it's a pity not to be able to use them via the MultivaluedMap interface):

    void addAll(K key, V... newValues);
    void addAll(K key, List<V> valueList);
    void addFirst(K key, V value);

The problem is that this is a potentially BW incompatible change. While I assume that mostly JAX-RS implementation providers will be affected, which is OK, I'm not sure if there's anyone out there among users providing their own implementations of the interface. Do you know of anyone? Is it a bad idea to add those methods? Should I introduce another sub-interface (e.g. Multimap) instead?

(Note that I've added the methods to the MultivaluedMap interface already just as a preliminary trial to see if I receive any rants from community and I am ready to remove the methods if I receive any pushback either from you or from anyone in the community.)

Looking forward to your feedback,
Marek