On May 11, 2009, at 9:15 PM, Paul C. Bryan wrote:
> I'm thinking that the MultivalueMapImpl.getList method -- since it
> exercises lazy initialization of the list -- should be synchronized.
> Make sense?
>
No, because it is not designed to be a concurrent implementation. I do
not recall there being a place in Jersey where an instance of
MultivalueMapImpl is modified concurrently.
I think the right thing to do is, if one requires an instance to be
modified concurrently, to have a ConcurrentMultivaluedMapImpl
implementation that adapts an instance of MultivaluedMap, which is
similar to how the Java collections framework is designed.
Paul.