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

CDI validator should mark a bean with duplicated EL name if @Named declared in the stereotype

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.M3
    • 3.3.0.M3
    • cdi
    • None

      EXECUTE: Create a CDI project
      EXECUTE: Add the following code to the project:

      @Stereotype
      @Named
      @Target({ TYPE, METHOD, FIELD })
      @Retention(RUNTIME)
      @Documented
      public @interface TestS {
      }
      
      import javax.enterprise.inject.Produces;
      import javax.inject.Named;
      
      public class MyBean {
      
      	@Produces @Named // Duplicate EL name
      	public String foo4() {return "";}
      
      	@Produces @TestS // Duplicate EL name
      	public String foo4;
      }
      

      ASSERT: See comments in MyBean.java. There should be a problem marker on annotation @TestS of field foo4 in MyBean.java instead of annotation @Named in TestS.java.

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

              Created:
              Updated:
              Resolved: