Uploaded image for project: 'Commons JXPath'
  1. Commons JXPath
  2. JXPATH-157

DescendantContext.nextNode() produce infinite loop

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Blocker
    • Resolution: Unresolved
    • 1.3
    • 1.4
    • None
    • Windows XP, JDK 6

    Description

      While using "descendant::children" the class DescendantContext produces an infinite loop in method nextNode() on line 114:

      if (it.setPosition(it.getPosition() + 1)) {

      The method "setPosition" returns true every time and the stack increases with a new child iterator on every loop.
      The reason is that we have an object with property "baseUnit", that returns a new object on every call. The class "BeanPropertyPointer" gets all properties from this object and returns a "PropertyDescriptor" for "baseUnit" property. But for this property a new object is returned and also a new "PropertyDescriptor" and so on.

      e.g.

      /children[1]/children[1]/children[1]/children[1]/children[1]/children[1]/masterData/netInclusion/alocatLimitEntryBioMuePMax/defaultQuantityAndUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit/baseUnit
      [..]

      We need to configure the maximum iterations of the object path.

      Attachments

        Activity

          People

            Unassigned Unassigned
            marfir Gerd Gühne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: