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