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

Warning missing when trying to inject bean without specified scope

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • 4.2.0.Beta3
    • 4.2.0.Beta2
    • cdi
    • None
    • Hide

      1.create EJB CDI 1.1 project with bean-discovery-mode="annotated" (which is default)
      2.create bean without specified scope, smt like

      public class Bean1 {
      
      	public Bean1() {
      		// TODO Auto-generated constructor stub
      	}
      
      }
      

      3. export EJB CDI 1.1 jar
      4. create new CDI 1.1 project
      5. add EJB CDI 1.1 to buildpath
      6. create class which will try to inject Bean1, smt like

      public class Test{
      	
      	@Inject Bean1 b;
      
      }
      

      FAIL: warning should be displayed because bean-discovery-mode is set to annotated and Bean1 doesnt specify scope.

      Show
      1.create EJB CDI 1.1 project with bean-discovery-mode="annotated" (which is default) 2.create bean without specified scope, smt like public class Bean1 { public Bean1() { // TODO Auto-generated constructor stub } } 3. export EJB CDI 1.1 jar 4. create new CDI 1.1 project 5. add EJB CDI 1.1 to buildpath 6. create class which will try to inject Bean1, smt like public class Test{ @Inject Bean1 b; } FAIL: warning should be displayed because bean-discovery-mode is set to annotated and Bean1 doesnt specify scope.

      If Im not mistaken, we should show warning when trying to inject bean without specified scope and bean-discovery-mode="annotated"

            scabanovich Viacheslav Kabanovich (Inactive)
            rawagner@redhat.com Rastislav Wagner
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: