users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Headers in ReaderInterceptor - read-only or not?

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Fri, 8 Feb 2013 10:37:30 +0000

On 08/02/13 10:35, Marek Potociar wrote:
> Hello experts,
>
> please review the issue bellow:
> http://java.net/jira/browse/JAX_RS_SPEC-268
>
> In summary, currently ReaderInterceptorContext.getHeaders() are
> documented to return a *mutable* header map. We have seen the use case
> in Jersey where mutability is useful. OTOH, Sergey argues that the
> returned headers should be immutable to avoid potential side-effects
> (see the issue comments for more reasoning).
>
> Please share your opinion on the subj. so that we can resolve the issue.
>
> Bill, interceptors is something that was inspired by RestEASY. What is
> your take on this? While the API docs of your MessageBodyReaderContext
> is, let's say, concise :) it is at least obvious that you provide a way
> how to modify Content-Type (via setMediaType()), which would be in line
> with the use case we saw in Jersey.
>

Sorry, I've already resolved it as Fixed on your behalf again;
That said - thanks for initiating the thread, if someone has some
specific concerns then I guess we can Re-Fix it somehow yet again :-)

Sergey

> Looking forward to your feedback,
> Marek