Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-11540

Bean stereotypes are computed incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.Beta3
    • 3.3.0.Beta1
    • cdi
    • None

      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

      @Stereotype
      @Named
      @Target({ TYPE})
      @Retention(RUNTIME)
      @Documented
      public @interface FirstStereotype {
      }
      
      @Stereotype
      @FirstStereotype
      @Target({ TYPE})
      @Retention(RUNTIME)
      @Documented
      public @interface SecondStereotype {
      }
      
      @SecondStereotype 
      public class Bean {
      }
      

      ASSERT: EL name "bean" is available.

            scabanovich Viacheslav Kabanovich (Inactive)
            scabanovich Viacheslav Kabanovich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: