[jbosstools-issues] [JBoss JIRA] Updated: (JBIDE-9722) Injection point annotated with @New should be resolved even if bean class does not belong to a bean archive.

Viacheslav Kabanovich (JIRA) jira-events at lists.jboss.org
Mon Sep 19 14:11:26 EDT 2011


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

Viacheslav Kabanovich updated JBIDE-9722:
-----------------------------------------

    Steps to Reproduce: 
EXECUTE: Add to a bean initializing method:
{code}
@Inject
public void initialize(@New(HashSet.class) Set<String> children) {
}
{code}
ASSERT: There is no error marker on the method, and open-on suggest 'Open @Inject Bean HashSet'.
EXECUTE: Modify method as follows

{code}
@Inject
public void initialize(@New Set<String> children) {
}
{code}
ASSERT: Error marker 'No bean is eligible for injection...' appeared, and open-on suggests no bean to open. That is correct because no concrete class implementing interface Set is specified.



> Injection point annotated with @New should be resolved even if bean class does not belong to a bean archive.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-9722
>                 URL: https://issues.jboss.org/browse/JBIDE-9722
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: CDI
>    Affects Versions: 3.3.0.M3
>            Reporter: Viacheslav Kabanovich
>            Assignee: Alexey Kazakov
>             Fix For: 3.3.0.M4
>
>
> See JSR-299 3.12. @New qualified beans.
> For each managed bean, and for each session bean, a second bean exists which:
> • has the same bean class,
> • has the same bean types,
> • has the same bean constructor, initializer methods and injected fields, and
> • has the same interceptor bindings.
> However, this second bean:
> • has scope @Dependent,
> • has a exactly one qualifier: @javax.enterprise.inject.New(X.class) where X is the bean class,
> • has no bean EL name,
> • has no stereotypes,
> • has no observer methods, producer methods or fields or disposer methods, and
> • is not an alternative, and
> • is enabled, in the sense of Section 5.1.2, "Enabled and disabled beans", if and only if some other enabled bean has an
>        injection point with the qualifier @New(X.class) where X is the bean class.
> This bean is called the @New qualified bean for the class X.
> Note that this second bean exists—and may be enabled and available for injection—even if the first bean is disabled.

--
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