Commons JXPath
  1. Commons JXPath
  2. JXPATH-143

JXPathContext.iterate does not work with null value in LazyDynaBean

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: None
    • Labels:
      None

      Description

      The following code fails with a NoSuchElementException:

      LazyDynaBean bean = new LazyDynaBean();
      bean.set("test", null);
      JXPathContext context = JXPathContext.newContext(bean);
      context.iterate("test").next();

      Replacing the value in the bean for anything but null works as expected.

        Issue Links

          Activity

          Hide
          Zhongxian Gu added a comment -

          Hi,

          I think this bug is duplicate to JXPATH-128.

          I am building a tool to analyse bugs. The tool is aimed at finding similar bugs so that we can make use of this information. One possibility would be that similar bugs are actually duplicate bugs. With this information, programmers need not to explore these bug reports one by one, instead can view them as one bug, thus saving the efforts.

          I input some bugs in this project. According to my tool's analysis, JXPATH-143 is very likely to related to JXPATH 128. I tried to resolve 143 based on fix patch of 128. Finally it turns out that JXPATH-143 is duplicate to 128. The patch to 128 is the essential code to resolve 143. With jxpath-1.3 patched the 128's patch, 143 will run smoothly without any runtime exception.

          I am new to JXPATH, and not 100% sure of it.

          Best

          Zhongxian

          Show
          Zhongxian Gu added a comment - Hi, I think this bug is duplicate to JXPATH-128 . I am building a tool to analyse bugs. The tool is aimed at finding similar bugs so that we can make use of this information. One possibility would be that similar bugs are actually duplicate bugs. With this information, programmers need not to explore these bug reports one by one, instead can view them as one bug, thus saving the efforts. I input some bugs in this project. According to my tool's analysis, JXPATH-143 is very likely to related to JXPATH 128. I tried to resolve 143 based on fix patch of 128. Finally it turns out that JXPATH-143 is duplicate to 128. The patch to 128 is the essential code to resolve 143. With jxpath-1.3 patched the 128's patch, 143 will run smoothly without any runtime exception. I am new to JXPATH, and not 100% sure of it. Best Zhongxian

            People

            • Assignee:
              Unassigned
              Reporter:
              Mikael Nordenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development