[weld-issues] [JBoss JIRA] Updated: (WELDX-156) Non-Generic versions of generic beans are still eligible for injection

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Fri Sep 24 21:48:28 EDT 2010


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

Stuart Douglas updated WELDX-156:
---------------------------------

        Summary: Non-Generic versions of generic beans are still eligible for injection  (was: Problem with generic beans when using qualifiers other than @Default)
    Description: 
Generic beans need to have a synthetic qualifier added to them to prevent them from being resolved. 
At the moment this is preventing the use of @Default generic producer methods, as both the original generic bean and the produced bean will have the same type and qualifiers.

To a lesser extent this also affects generic producers. There are no problems if the producer is implicitly @Default, as the @Default is removed by adding the GenericMarker qualifier, however if there is an existing qualifier then the bean will have the qualifiers @SomeQualifier @GenericMarker and is still eligible for injection into @SomeQualifier injection points.

  was:Generic beans add synthetic qualifiers to beans to prevent them from being eligible for injection. This works if the bean is implicitly @Default, as the @Default is removed by adding the synthetic qualifier, however if there is an existing qualifier then the bean will have the qualifiers @SomeQualifier @Synthetic and is still eligible for injection into @SomeQualifier injection points.



> Non-Generic versions of generic beans are still eligible for injection
> ----------------------------------------------------------------------
>
>                 Key: WELDX-156
>                 URL: https://jira.jboss.org/browse/WELDX-156
>             Project: Weld Extensions
>          Issue Type: Bug
>            Reporter: Stuart Douglas
>            Assignee: Stuart Douglas
>             Fix For: 1.0.0.Beta1
>
>
> Generic beans need to have a synthetic qualifier added to them to prevent them from being resolved. 
> At the moment this is preventing the use of @Default generic producer methods, as both the original generic bean and the produced bean will have the same type and qualifiers.
> To a lesser extent this also affects generic producers. There are no problems if the producer is implicitly @Default, as the @Default is removed by adding the GenericMarker qualifier, however if there is an existing qualifier then the bean will have the qualifiers @SomeQualifier @GenericMarker and is still eligible for injection into @SomeQualifier injection points.

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

        


More information about the weld-issues mailing list