elena       2002/11/06 14:58:28

  Modified:    java/src/org/apache/xerces/dom NodeIteratorImpl.java
  Log:
  Bug fix: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13062
  
  Revision  Changes    Path
  1.11      +7 -1      xml-xerces/java/src/org/apache/xerces/dom/NodeIteratorImpl.java
  
  Index: NodeIteratorImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/NodeIteratorImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- NodeIteratorImpl.java     24 Aug 2002 20:34:18 -0000      1.10
  +++ NodeIteratorImpl.java     6 Nov 2002 22:58:28 -0000       1.11
  @@ -278,6 +278,12 @@
       
       /** Return node, if matches or any parent if matches. */
       Node matchNodeOrParent(Node node) {
  +        // Additions and removals in the underlying data structure may occur
  +        // before any iterations, and in this case the reference_node is null.
  +        if (fCurrentNode == null) return null;
  +        
  +        // check if the removed node is an _ancestor_ of the 
  +        // reference node
           for (Node n = fCurrentNode; n != fRoot; n = n.getParentNode()) {
               if (node == n) return n;
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to