Commons JXPath
  1. Commons JXPath
  2. JXPATH-35

JXPathIntrospector Method JXPathIntrospector.getBeanInfo doesn't find correct JXPathBeanInfo Objects

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1 Final
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: PC

      Description

      I have written a class MyDynamicPropertyHandler.
      I execute the following Code:

      JXPathBeanInfo info0;
      JXPathBeanInfo info1;

      JXPathIntrospector.registerDynamicClass(Component.class,
      MyDynamicPropertyHandler.class);

      info0=JXPathIntrospector.getBeanInfo(Component.class);
      info1=JXPathIntrospector.getBeanInfo(JComponent.class);

      sLogger.debug("isSame: "+(info0==info1));

      The output is:

      isSame false

      I think the Objects info0 and info1 should be the same
      because I Component is a parent of JComponent.

        Activity

        Hide
        Dmitri Plotnikov added a comment -

        Changed to code to accept inherited BeanInfo, but only if it is Dynamic. We
        don't want to inherit regular BeanInfo, because that could hide added
        properties/methods.

        Show
        Dmitri Plotnikov added a comment - Changed to code to accept inherited BeanInfo, but only if it is Dynamic. We don't want to inherit regular BeanInfo, because that could hide added properties/methods.
        Hide
        Heiko Bensch added a comment -

        Created an attachment (id=11166)
        the patch fix this bug

        Show
        Heiko Bensch added a comment - Created an attachment (id=11166) the patch fix this bug

          People

          • Assignee:
            Unassigned
            Reporter:
            Heiko Bensch
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development