[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 09:30:54 EST 2013


Done

WELD-1552 - InjectionPoint resolution not conform to CDI 1.1 spec
Perhaps there’s also a hole in TCK here ?

Antoine Sabot-Durand
———————————————
Senior Software engineer
CDI co-spec lead
CDI eco-system development

Le 12 nov. 2013 à 12:10, Jozef Hartinger <jharting at redhat.com> a écrit :

> 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 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/a4c83b60/attachment.html 


More information about the weld-dev mailing list