cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon Utils.java
Date Mon, 24 Jan 2000 21:36:42 GMT
stefano     00/01/24 13:36:42

  Modified:    src/org/apache/cocoon Utils.java
  Log:
  fixed NPE with PI removing
  
  Revision  Changes    Path
  1.6       +6 -3      xml-cocoon/src/org/apache/cocoon/Utils.java
  
  Index: Utils.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Utils.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Utils.java	2000/01/23 23:14:11	1.5
  +++ Utils.java	2000/01/24 21:36:42	1.6
  @@ -1,4 +1,4 @@
  -/*-- $Id: Utils.java,v 1.5 2000/01/23 23:14:11 stefano Exp $ -- 
  +/*-- $Id: Utils.java,v 1.6 2000/01/24 21:36:42 stefano Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -61,7 +61,7 @@
    * Utility methods for Cocoon and its classes.
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.5 $ $Date: 2000/01/23 23:14:11 $
  + * @version $Revision: 1.6 $ $Date: 2000/01/24 21:36:42 $
    */
   
   public final class Utils {
  @@ -88,7 +88,10 @@
               if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) {
                   if (((ProcessingInstruction) node).getTarget().equals(name)) {
                       pis.addElement(node);
  -                    if (remove) node.getParentNode().removeChild(node);
  +                    if (remove) {
  +                        node.getParentNode().removeChild(node);
  +                        i--;
  +                    }
                   }
               }
           }
  
  
  

Mime
View raw message