Dave Brosius wrote:

In org.apache.xindice.xml.dom.traversal.TreeWalkerImpl is this code
Clearly this is wrong:
if ( node == null )
node = node.getParentNode();


Ack. This code is still in there.

Do you have patch suggestion? And if you can also provide a JUnit test for it, that would be superb :-)

Vadim



   public Node previousNode() {
      Node node = next;
      while ( true ) {
         node = node.getPreviousSibling();
         if ( node == null )
            node = node.getParentNode();
         else
            while ( node.hasChildNodes() )
               node = node.getLastChild();
         if ( node != null && acceptNode(node) ) {
            next = node;
            return next;
         }
         else if ( node == null )
            return null;
      }
   }




Reply via email to