You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2006/11/07 22:42:28 UTC

DO NOT REPLY [Bug 40918] New: - Incorrect recursion in DOMUtil.listChildNodes()

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40918>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40918

           Summary: Incorrect recursion in DOMUtil.listChildNodes()
           Product: Ant
           Version: 1.6.5
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: birdo@parasoft.com


Inspection of the code in org.apache.tools.ant.taskdefs.optional.junit.DOMUtil
shows a likely bug in the if (recurse) block which will cause the wrong nodes to
be added to the matches list.

The code reads:

if (recurse) {
    NodeList recmatches = listChildNodes(child, filter, recurse);
    final int reclength = matches.getLength();
    for (int j = 0; j < reclength; j++) {
        matches.addElement(recmatches.item(i));
    }
}

It should likely be:

if (recurse) {
    NodeList recmatches = listChildNodes(child, filter, recurse);
    final int reclength = recmatches.getLength();
    for (int j = 0; j < reclength; j++) {
        matches.addElement(recmatches.item(j));
    }
}

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 40918] - Incorrect recursion in DOMUtil.listChildNodes()

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40918>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40918


antoine@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.7.0




------- Additional Comments From antoine@apache.org  2006-11-08 19:46 -------
Thanks for the bug report. The change is now checked in in Subversion.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org