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

Antoine Sabot-Durand antoine at sabot-durand.net
Tue Nov 12 04:18:10 EST 2013


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 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

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


More information about the weld-dev mailing list