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

Problem with CDI validator

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 4.0.0.Alpha1
    • Fix Version/s: 4.5.1.AM2
    • Component/s: cdi
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      EXEC: create dynamic web project without CDI support
      EXEC: create bean:

      import javax.enterprise.inject.Produces;
      import javax.inject.Inject;
      
      public class Test {
      
      	@Inject String injectionPoint;
      	
      	@Produces
      	public String value1() {
      		return null;
      	}
      	
      	@Produces
      	public String value2() {
      		return null;
      	}
      	
      }
      

      EXEC: enable CDI support into project
      ASSERT: injection point is validated by CDI validator (multiple beans eligible for injection)
      FAIL: there is no validation marker on injection point

      Show
      EXEC: create dynamic web project without CDI support EXEC: create bean: import javax.enterprise.inject.Produces; import javax.inject.Inject; public class Test { @Inject String injectionPoint; @Produces public String value1() { return null ; } @Produces public String value2() { return null ; } } EXEC: enable CDI support into project ASSERT: injection point is validated by CDI validator (multiple beans eligible for injection) FAIL: there is no validation marker on injection point
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      1. Re-open the file with Java Editor after enabling CDI support
      OR
      2. Edit and save the file - this forces CDI validator to work

      Show
      1. Re-open the file with Java Editor after enabling CDI support OR 2. Edit and save the file - this forces CDI validator to work

      Description

      There is a problem to force CDI validator to work. In my case, I created simple dynamic web project without CDI support, added some bean with Multiple beans eligible case (message not present yet). Add CDI support into project. Expected validation messages won't appear - cleaning the project doesn't help either.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rawagner Rastislav Wagner
                  Reporter:
                  jjankovi Jaroslav Jankovič
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: