[jbosstools-issues] [JBoss JIRA] Updated: (JBIDE-9723) Injection points declared in producer methods should be validated as injection points of the producer but not as injections of the class bean

Alexey Kazakov (JIRA) jira-events at lists.jboss.org
Thu Sep 15 20:56:26 EDT 2011


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

Alexey Kazakov updated JBIDE-9723:
----------------------------------

    Description: 
EXECUTE: Create a CDI project.
EXECUTE: Create the following class:
{code}
@ApplicationScoped
public class ProducerWInjections {

    @Produces
    public Test produce(InjectionPoint ip) {
    	return null;
    }

    public static class Test {
    }
}
{code}
EXECUTE: Build the project.
FAILURE: *InjectionPoint ip* is marked as an error "Bean that declares any scope other than @Dependent has an injection point of type InjectionPoint and qualifier @Default [JSR-299 §5.5.7]"
That's not correct since the injection points belongs to the producer method bean which scoped correctly. We should not validate such a injection against a bean class.

  was:
EXECUTE: Create a CDI project.
EXECUTE: Create the following class:
{code}
@ApplicationScoped
public class ProducerWInjections {

    @Produces
    public Test produce(InjectionPoint ip) {
    	return null;
    }

    public static class Test {
    }
}
{code}
EXECUTE: Build the project.
FAILURE: *InjectionPoint ip* is marked as an error *Bean that declares any scope other than @Dependent has an injection point of type InjectionPoint and qualifier @Default [JSR-299 §5.5.7]*
That's not correct since the injection points belongs to the producer method bean which scoped correctly. We should not validate such a injection against a bean class.



> Injection points declared in producer methods should be validated as injection points of the producer but not as injections of the class bean
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-9723
>                 URL: https://issues.jboss.org/browse/JBIDE-9723
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: CDI
>    Affects Versions: 3.3.0.M3
>            Reporter: Alexey Kazakov
>            Assignee: Alexey Kazakov
>             Fix For: 3.3.0.M4
>
>
> EXECUTE: Create a CDI project.
> EXECUTE: Create the following class:
> {code}
> @ApplicationScoped
> public class ProducerWInjections {
>     @Produces
>     public Test produce(InjectionPoint ip) {
>     	return null;
>     }
>     public static class Test {
>     }
> }
> {code}
> EXECUTE: Build the project.
> FAILURE: *InjectionPoint ip* is marked as an error "Bean that declares any scope other than @Dependent has an injection point of type InjectionPoint and qualifier @Default [JSR-299 §5.5.7]"
> That's not correct since the injection points belongs to the producer method bean which scoped correctly. We should not validate such a injection against a bean class.

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