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

CDI Model in a dependent CDI receives out-of-date Java type from used project.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.M4
    • 3.3.0.M3
    • cdi
    • None
    • Hide
      1. EXECUTE: Create 2 CDI projects: Test1 depends on Test2.
      2. EXECUTE: Create in Test2 two interfaces test.p1.I and test.p2.I
      3. EXECUTE: Create producer in Test2
        package test;
        import javax.enterprise.inject.Produces;
        import test.p1.I;
        public class MyProducer {
            @Produces I getI() {
                return null;
            }
        }
        
      4. EXECUTE: Create injection in Test2
        package test;
        import javax.inject.Inject;
        import test.p2.I;
        public class MyBean {	
            @Inject I i;
        }
        
      5. EXECUTE: Create or modify any bean in Test1 in order to activate its CDI model.
      6. EXECUTE: Modify package in MyBean: change 'import test.p1.I' to 'import test.p2.I', save, change back, save etc.
      7. ASSERT: Open on always correctly suggest to open producer if 'I' is imported from 'p1' and has no suggestions when 'I' is imported from 'p2'.
      Show
      EXECUTE: Create 2 CDI projects: Test1 depends on Test2. EXECUTE: Create in Test2 two interfaces test.p1.I and test.p2.I EXECUTE: Create producer in Test2 package test; import javax.enterprise.inject.Produces; import test.p1.I; public class MyProducer { @Produces I getI() { return null ; } } EXECUTE: Create injection in Test2 package test; import javax.inject.Inject; import test.p2.I; public class MyBean { @Inject I i; } EXECUTE: Create or modify any bean in Test1 in order to activate its CDI model. EXECUTE: Modify package in MyBean: change 'import test.p1.I' to 'import test.p2.I', save, change back, save etc. ASSERT: Open on always correctly suggest to open producer if 'I' is imported from 'p1' and has no suggestions when 'I' is imported from 'p2'.

      Now it fails on step 7. Error state of injection does not change. (If CDI in Test1 was activated when injection was correct, error marker will never appear; and if CDI in Test1 was activated when injection was incorrect, error marker will stick to it).

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

              Created:
              Updated:
              Resolved: