[weld-issues] [JBoss JIRA] (WELD-966) TCK test failure: ResolutionByNameTest#testFieldNameUsedAsBeanName()
Ales Justin (Updated) (JIRA)
jira-events at lists.jboss.org
Wed Oct 12 06:07:18 EDT 2011
[ https://issues.jboss.org/browse/WELD-966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ales Justin updated WELD-966:
-----------------------------
Fix Version/s: 1.2.0.Beta1
> TCK test failure: ResolutionByNameTest#testFieldNameUsedAsBeanName()
> --------------------------------------------------------------------
>
> Key: WELD-966
> URL: https://issues.jboss.org/browse/WELD-966
> Project: Weld
> Issue Type: Bug
> Affects Versions: 1.1.2.Final
> Environment: JBoss AS 7
> Arquillian/TestNG
> Reporter: Martin Kouba
> Assignee: Ales Justin
> Priority: Critical
> Fix For: 1.2.0.Beta1
>
>
> Running org.jboss.jsr299.tck.tests.lookup.byname.ResolutionByNameTest#testFieldNameUsedAsBeanName() in CDI TCK 1.1 branch fails on deployment validation:
> WELD-001408 Unsatisfied dependencies for type [Animal] with qualifiers [@Named] at injection point [[field] @Named @Inject private org.jboss.jsr299.tck.tests.lookup.byname.FishingNet.carp]"}}
> After some debugging I found out that the problem is very likely related to the way default names are handled on injection point and bean definition.
> Injection point:
> {code}
> @Inject @Named
> private Animal carp;
> {code}
> The original qualifier is replaced if no value is specified (@Named => @Named(value="carp")). See org.jboss.weld.resolution.ResolvableBuilder(InjectionPoint).
> Bean definition:
> {code}
> @Named
> public class Carp implements Animal
> {code}
> The qualifier remains the same (without value; see AbstractBean#initName()) only EL name on definition is changed.
> Later in org.jboss.weld.util.Beans#containsAllQualifiers() comparing the injection point new qualifier to the one on bean definition no match is found (value on @Named is binding) and thus validation fails with error message above.
> Related CDI spec chapters:
> 2.5.2 Default bean EL names
> 3.1.5 Default name for a managed bean
> 3.11 The qualifier @Named at injection points
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the weld-issues
mailing list