users@jax-rs-spec.java.net

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

From: Bill Burke <bburke_at_redhat.com>
Date: Fri, 17 May 2013 10:35:53 -0400

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.
-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com