commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerd Gühne (JIRA) <j...@apache.org>
Subject [jira] [Created] (JXPATH-157) DescendantContext.nextNode() produce infinite loop
Date Wed, 06 Jun 2012 15:03:22 GMT
Gerd Gühne created JXPATH-157:
---------------------------------

             Summary: DescendantContext.nextNode() produce infinite loop
                 Key: JXPATH-157
                 URL: https://issues.apache.org/jira/browse/JXPATH-157
             Project: Commons JXPath
          Issue Type: Bug
    Affects Versions: 1.3
         Environment: Windows XP, JDK 6
            Reporter: Gerd Gühne
            Priority: Blocker
             Fix For: 1.4


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message