#62 RecursiveElementAndNameQualifier seems to have got the counters wrong.

Java_1.4
closed-fixed
nobody
None
5
2014-12-29
2013-07-24
fnaeem
No

The counter i and j are reversed when retrieving the nodes. i is the counter for controlNodes, while j is for testNodes. In the for-loop the opposite one is used to retrieve the node. This can result null unexpectedly, if the index is out of bounds. From RecursiveElementAndNameQualifier.java v 1.4 line 114-121.

final int cNodes = controlNodes.getLength();
final int tNodes = testNodes.getLength();

        int i, j;
        for (i = j = 0; i < cNodes && j < tNodes; i++, j++) {
            Node testNode = testNodes.item(i);
            Node controlNode = controlNodes.item(j);

Discussion

  • Stefan Bodewig

    Stefan Bodewig - 2013-08-13
    • status: open --> pending-fixed
     
  • Stefan Bodewig

    Stefan Bodewig - 2013-08-13

    Good catch, fixed with svn revision 538.

    Thanks!

     
  • Stefan Bodewig

    Stefan Bodewig - 2014-12-29
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks