[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-7950) Abstract classes is being considered injectable

Max Andersen (JIRA) jira-events at lists.jboss.org
Mon Dec 20 17:43:17 EST 2010


    [ https://issues.jboss.org/browse/JBIDE-7950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571473#comment-12571473 ] 

Max Andersen commented on JBIDE-7950:
-------------------------------------

Yes, for this example outlined in the jira description there is both ProjectImpl and getCurrent() as candidate injections which means ambiguity.


> Abstract classes is being considered injectable
> -----------------------------------------------
>
>                 Key: JBIDE-7950
>                 URL: https://issues.jboss.org/browse/JBIDE-7950
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: cdi (jsr-299)
>    Affects Versions: 3.2.0.Beta2
>            Reporter: Max Andersen
>            Assignee: Viacheslav Kabanovich
>            Priority: Critical
>             Fix For: 3.2.0.CR1
>
>
> public interface Project {
> }
> public abstract class AbstractProject implements Project {
> }
> public class ProjectImpl extends AbstractProject {
> }
> @Singleton
> public class CurrentProject {
>  @Produces
>    @Default
>    @Dependent
>    public Project getCurrent()
> }
> and then:
> @Inject Project project;
> And I get "Multiple beans are eligible for injection to the injection point"
> Open All elgible beans seem to consider getCurrent() *and* the abstract class - but for some reason not ProjectImpl as elgible.
> Should it not just be getCurrent() ?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list