[jax-rs-spec users] [jsr339-experts] Re: ContainerResponseContext.getEntityAnnotations() discrepancy

From: Sergey Beryozkin <>
Date: Fri, 17 May 2013 15:41:52 +0100

Hi Bill
On 17/05/13 15:35, Bill Burke wrote:
> The TCK test lead and I are both interpreting
> ContainerResponseContext.getEntityAnnotations()
> IMO, if the app code has attached an entity view
> ResponseBuilder.entity(Object, Annotation[])
> then only those attached annotations should be returned by
> getEntityAnnotations().
> The TCK test lead is saying that both those annotations *AND* the
> annotations on the resource method should be returned.
> The language in the spec is a tiny bit unclear, but, IMO, it makes no
> sense to include both of them. The whole point of
> ResponseBuilder.entity(Object, Annotation[]) is so that you can
> exclusively provide the annotations attached to the entity.

We talked with Marek a lot about it, well, the rules are that
ResponseBuilder.entity method appends Annotations, and
ContainerResponseFilter replaces them, is that perfect, I'm not sure,
but I don't mind :-).

Thanks, Sergey