[jbosstools-issues] [JBoss JIRA] (JBIDE-11540) Bean stereotypes are computed incorrectly

Viacheslav Kabanovich (JIRA) jira-events at lists.jboss.org
Fri Apr 13 18:41:47 EDT 2012


Viacheslav Kabanovich created JBIDE-11540:
---------------------------------------------

             Summary: Bean stereotypes are computed incorrectly
                 Key: JBIDE-11540
                 URL: https://issues.jboss.org/browse/JBIDE-11540
             Project: Tools (JBoss Tools)
          Issue Type: Bug
          Components: CDI
            Reporter: Viacheslav Kabanovich
            Assignee: Viacheslav Kabanovich


If a bean is annotated by stereotype A it inherits all additional stereotypes declared in A (see 2.7.1.5). All those stereotypes are to be taken into account when computing bean name, scope, enablement, and looking for @alternative. Additional stereotypes are inherited independently of annotation @Inherit on stereotype, which only controls inheritance from super classes.

Test that shows the problem with named beans:
EXECUTE: Create stereotypes FirstStereotype, SecondStereotype and bean Bean
{code}
@Stereotype
@Named
@Target({ TYPE})
@Retention(RUNTIME)
@Documented
public @interface FirstStereotype {
}
{code}

{code}
@Stereotype
@FirstStereotype
@Target({ TYPE})
@Retention(RUNTIME)
@Documented
public @interface SecondStereotype {
}
{code}

{code}
@SecondStereotype 
public class Bean {
}
{code}
ASSERT: EL name "bean" is available.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list