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

Open-on of bean method in EL, sometimes opens overridden method in a superclass

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.Beta3
    • 3.3.0.Beta1
    • cdi, common
    • None

      EXECUTE: Create beans

      public class TestBeanA {
          public String getId() {
              return "bean a";
          }
      }
      
      public class TestBeanB extends TestBeanA {
      
          @Override
          public String getId() {
              return "bean b";
          }
      }
      
      
      @Named("test")
      public class TestBeanC extends TestBeanB {
      
          @Override
          public String getId() {
              return "bean c";
          }
      }
      

      EXECUTE: Insert into a page EL #

      {test.id}

      ASSERT: open-on from 'id' should select TestBeanC.getId().
      FAILURE: Method getId() from a super class is selected.

      Note: If the issue is not reproduced with this exact steps, try more classes or change the hierarchy, e.g. TestBeanB -> TestBeanC -> TestBeanA instead TestBeanC -> TestBeanB -> TestBeanA (always move @Named("test") to the last class in new hierarchy).

      This issue is related to JBIDE-11473, because problem is in sorting of types in method TypeInfoCollector.collectInfo(boolean).

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

              Created:
              Updated:
              Resolved: