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

Legal types of default bean producer without @DefaultBean annotation should be restricted by its member type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.M5
    • 3.3.0.M4
    • cdi-extensions
    • None

      EXECUTE: Create in a CDI solder project these three classes:

      @DefaultBean(Test1.class)
      public class Test1 {
      	
      	@Inject
      	TypeB b;
      
      	@Inject
      	TypeA a;
      	
      	@Produces
      	TypeB pb;
      
      	@Produces
      	TypeA pa;
      }
      
      public class TypeA {
      	TypeA(String s) {}
      }
      
      public class TypeB extends TypeA {
      	TypeB(String s) {
      		super(s);
      	}
      }
      

      ASSERT: Injection point 'a' is resolved to producer 'pa', and injection point 'b' is resolved to producer 'pb'.

      FAILURE: Injection point 'a' is resolved to the both producers 'pa' and 'pb', which can be seen by marker 'Multiple beans are eligible...' and in 'Assignable Beans' dialog

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

              Created:
              Updated:
              Resolved: