<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Hi all,</div><div><br></div><div>I’m experiencing what I think being a regression and a specification violation.</div><div><br></div><div>In my use case I have a producer annotated with @Named injecting an InjectionPoint:</div><div><br></div><div><div style="margin: 0px; font-family: Menlo;"><span style="color: #929000">@Produces</span></div><div style="margin: 0px; font-family: Menlo;"><span style="color: #929000">@Named<br>
</span><span style="color: #011993"><b>public </b></span>OAuthSession getCurrentSession(InjectionPoint ip) {…}</div></div><div><br></div><div>When I call <font face="Menlo">#{currentSession}</font> in JSF with Weld 1.x producer is called with InjectionPoint set to null. Now with weld 2.x an exception is thrown by <font face="Menlo">InjectionPointBean.getInjectionPoint()</font> method.</div><div><br></div><div>Form what I understand from section <a href="http://docs.jboss.org/cdi/spec/1.1/cdi-spec.html#contextual_reference" style="font-size: 14px; background-color: rgb(255, 255, 255); color: fuchsia;">6.5.3. Contextual reference for a bean</a> 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.</div><div><br></div><div>Thanks for your feedback on that point,</div><div><br></div><div><br></div><div><i>Antoine Sabot-Durand</i></div><div apple-content-edited="true"><div><div><i>———————————————</i></div><div><i>Senior Software engineer</i></div><div><i>CDI co-spec lead</i></div><div><i>CDI eco-system development</i></div></div>
</div>
<br></body></html>