[weld-dev] AnnotatedType and the SPI

Pete Muir pmuir at redhat.com
Tue Jan 12 06:43:20 EST 2010


On 12 Jan 2010, at 09:46, Stuart Douglas wrote:

> Does the spec define what should happen if an AnnotatedType added through the SPI is missing a method/field/parameter etc that is present on the underlying class? 
> I had a look but I could not see anything in spec, and as far as I can tell weld is inconsistant with regard to how it treats it. If an AnnotatedParameter is missing it uses the Annotations on the underlying class, however if a field definition is missing it treats it as having no annotations (I have not actually tested this, just has a quick look at the code, so I could be wrong).

We should *always* merge the annotations from the underlying class with any specified through Annotated*. If Weld does differently, it's a bug :-)


More information about the weld-dev mailing list