[weld-dev] Difference behavior between Weld 1 and 2 on EL resolution and InjectionPoint

Jozef Hartinger jharting at redhat.com
Tue Nov 12 06:10:14 EST 2013


You are right, this is a bug in Weld. Please file a Weld issue.

On 11/12/2013 10:18 AM, Antoine Sabot-Durand wrote:
> Hi all,
>
> I'm experiencing what I think being a regression and a specification 
> violation.
>
> In my use case I have a producer annotated with @Named injecting an 
> InjectionPoint:
>
> @Produces
> @Named
> *public *OAuthSession getCurrentSession(InjectionPoint ip) {...}
>
> When I call #{currentSession} in JSF with Weld 1.x producer is called 
> with InjectionPoint set to null. Now with weld 2.x an exception is 
> thrown by InjectionPointBean.getInjectionPoint() method.
>
> Form what I understand from section 6.5.3. Contextual reference for a 
> bean 
> <http://docs.jboss.org/cdi/spec/1.1/cdi-spec.html#contextual_reference> of 
> the CDI 1.1 spec, the behavior should the Weld 1.X one : returning 
> null instead of throwing an exception. I may be wrong but I can't find 
> anything in the spec about that.
>
> Thanks for your feedback on that point,
>
>
> /Antoine Sabot-Durand/
> /---------------------------------------------/
> /Senior Software engineer/
> /CDI co-spec lead/
> /CDI eco-system development/
>
>
>
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20131112/ee4bdb0c/attachment.html 


More information about the weld-dev mailing list