users@jsr311.java.net

Re: time to call MessageBodyReader

From: Stephan Koops <Stephan.Koops_at_web.de>
Date: Fri, 04 Apr 2008 17:29:48 +0200

Hi Marc,
> I don't recall now why the headers supplied to a MessageBodyReader are
> mutable ? It makes sense for writers but seems to me that headers in a
> reader could be read-only.
>
> If there's a good reason to have mutable headers in a reader then I
> propose that the reader should be invoked after the resource class
> constructor is called (for consistency between root resources and
> sub-resources) but before the values of any other method parameters
> are extracted.
I thought - because it is allowed for the MessageBodyWriter - that it is
also allowed for the reader. But now I've seen that it is not defined in
the javadoc. IMO define unmodifiable.

Stephan