[jbosstools-issues] [JBoss JIRA] Created: (JBIDE-9795) Abstract classes should not be included into CDI model as beans

Viacheslav Kabanovich (JIRA) jira-events at lists.jboss.org
Thu Sep 29 12:46:26 EDT 2011


Abstract classes should not be included into CDI model as beans
---------------------------------------------------------------

                 Key: JBIDE-9795
                 URL: https://issues.jboss.org/browse/JBIDE-9795
             Project: Tools (JBoss Tools)
          Issue Type: Bug
          Components: CDI
    Affects Versions: 3.3.0.M3
            Reporter: Viacheslav Kabanovich
            Assignee: Viacheslav Kabanovich
             Fix For: 3.3.0.M4


EXECUTE: Create class
{code}
@Named("mybean")
public abstract class MyBean {
}
{code}
ASSERT: There is no bean MyBean available for injection.
ASSERT: Bean name "mybean" is not available for EL.

One exception is the providing of built-in beans (e.g. specification requires CDI implementation to provide bean with type javax.validation.Validator), but such a bean can be provided by CDI implementations in a non-standard way, so that we should ensure the bean instance in model binding it to an abstract type. 

The other temporal exception is to be made for handling injection points in abstract types, it should be covered by separate issue. Now both validation, open-ons, tests access injection points through beans obtained with getBeans(IPath). We should consider migrating to getInjections(IPath), but that may involve extensive changes. So, let method getBeans(IPath) be out of the scope of this issue, and let us comment it properly that it currently returns both beans and bean-like CDI annotated objects.

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