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

As-you-type CDI validation not working if CDI support is added after cdi components creation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Critical
    • 4.1.0.Alpha2
    • 4.1.0.Alpha1
    • cdi
    • None
    • Hide

      First test case covers as-you-type CDI validation for CDI beans fail:

      STEP: create dynamic web project with simple bean:

      A.test
      public class A {
      
      	public A() {
      		
      	}
      
      }
      

      STEP: enable cdi support on the project
      STEP: modify bean to be session scoped (don't save the file):

      A.java
      @SessionScoped
      public class A {
      
      	public A() {
      		
      	}
      
      }
      

      FAIL: there is no expected validation warning ("Managed bean A1 which declares a passivating scope SessionScoped must be passivation capable [JSR-299 §6.6.4]")
      STEP: save the file (validation marker should be finally invoked)
      STEP: remove line with session scoped annotation (don't save the file)
      FAIL: validation marker is still there even session scoped validation is removed
      STEP: save the file (validation marker should disappear)

      Second test case covers as-you-type CDI validation for beans.xml fail:

      STEP: create dynamic web project with one simple bean (A1.java) and one alternative bean (A2.java) but don't register alternative bean in beans.xml:
      STEP: create beans.xml via wizard
      STEP: enable cdi support on the project
      STEP: modify beans.xml to contain non-alternative bean A1 (don't save the file)
      FAIL: there is no expected validation error ("is not an alternative bean class [JSR-299 §5.1.1]")
      STEP: save the file (validation marker should be finally invoked)
      STEP: modify alternative bean in beans.xml to be A2.java (don't save the file)
      FAIL: validation marker is still there even that A2.java is regular alternative bean
      STEP: save the file (validation marker should disappear)

      Show
      First test case covers as-you-type CDI validation for CDI beans fail : STEP: create dynamic web project with simple bean: A.test public class A { public A() { } } STEP: enable cdi support on the project STEP: modify bean to be session scoped (don't save the file): A.java @SessionScoped public class A { public A() { } } FAIL: there is no expected validation warning ("Managed bean A1 which declares a passivating scope SessionScoped must be passivation capable [JSR-299 §6.6.4] ") STEP: save the file (validation marker should be finally invoked) STEP: remove line with session scoped annotation (don't save the file) FAIL: validation marker is still there even session scoped validation is removed STEP: save the file (validation marker should disappear) Second test case covers as-you-type CDI validation for beans.xml fail : STEP: create dynamic web project with one simple bean (A1.java) and one alternative bean (A2.java) but don't register alternative bean in beans.xml: STEP: create beans.xml via wizard STEP: enable cdi support on the project STEP: modify beans.xml to contain non-alternative bean A1 (don't save the file) FAIL: there is no expected validation error ("is not an alternative bean class [JSR-299 §5.1.1] ") STEP: save the file (validation marker should be finally invoked) STEP: modify alternative bean in beans.xml to be A2.java (don't save the file) FAIL: validation marker is still there even that A2.java is regular alternative bean STEP: save the file (validation marker should disappear)

    Description

      As-you-type cdi validation is not working if cdi support is added into project after cdi components creation. I have tested it for both CDI beans and beans.xml

      Attachments

        Issue Links

          Activity

            People

              alexeykazakov Alexey Kazakov
              jjankovi Jaroslav Jankovič (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: