[weld-issues] [JBoss JIRA] Updated: (WELD-435) @Named as a qualifier doesn't default correctly

Pete Muir (JIRA) jira-events at lists.jboss.org
Mon Feb 15 09:40:10 EST 2010


     [ https://jira.jboss.org/jira/browse/WELD-435?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Muir updated WELD-435:
---------------------------

      Component/s: Resolution (Typesafe and by Name)
                       (was: Spec)
    Fix Version/s: 1.0.1.GA
         Priority: Critical  (was: Minor)


> @Named as a qualifier doesn't default correctly
> -----------------------------------------------
>
>                 Key: WELD-435
>                 URL: https://jira.jboss.org/jira/browse/WELD-435
>             Project: Weld
>          Issue Type: Bug
>          Components: Resolution (Typesafe and by Name)
>    Affects Versions: 1.0.0.GA
>         Environment: GlassFish v3, Windows XP SP3, JDK 1.6 u17
>            Reporter: Matthieu Chase Heimer
>            Priority: Critical
>             Fix For: 1.0.1.GA
>
>
> I think Weld has a error in the handling of @Named as a qualifier. From section 3.11
> If an injected field declares a @Named annotation that does not specify the value member, the name of the field is assumed.
> For example, the following field has the qualifier @Named("paymentService"):
> @Inject @Named PaymentService paymentService;
> However the line: @Inject @Named PaymentService paymentService; will only match a bean class with an empty value in the @Named qualifier. If the @Named qualifier has a string value then the qualifier on the injection point must also have the same string value. You can get a javax.enterprise.inject.UnsatisfiedResolutionException with code the spec implies should function.
> However what is less clear is whether or not an empty value in the @Named annotation of a bean class should be creating a default qualifier name or just a default EL name. So there is at least an issue with the handling of empty @Named values on injection points. Section 3.1.5 only mentions that beans with the @Named annotation will get a default EL name. Section 2.7.1.3 says that if @Named is used as part of a sterotype then the default name will be based on the classname however it isn't say if it would only be the EL name or also used as the value of the Named qualifier.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list