xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leh...@apache.org
Subject cvs commit: xml-xerces/java/src/org/apache/xerces/dom AttrImpl.java ParentNode.java
Date Tue, 06 Feb 2001 02:05:00 GMT
lehors      01/02/05 18:05:00

  Modified:    java/src/org/apache/xerces/dom AttrImpl.java ParentNode.java
  Log:
  fixed cloneNode so that children are synchronized before the node
  is cloned!
  
  Revision  Changes    Path
  1.31      +3 -2      xml-xerces/java/src/org/apache/xerces/dom/AttrImpl.java
  
  Index: AttrImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/AttrImpl.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- AttrImpl.java	2001/02/05 21:40:45	1.30
  +++ AttrImpl.java	2001/02/06 02:05:00	1.31
  @@ -202,12 +202,13 @@
       //
       
       public Node cloneNode(boolean deep) {
  -        AttrImpl clone = (AttrImpl) super.cloneNode(deep);
   
  -        // take care of case where there are kids
           if (needsSyncChildren()) {
               synchronizeChildren();
           }
  +        AttrImpl clone = (AttrImpl) super.cloneNode(deep);
  +
  +        // take care of case where there are kids
       	if (!clone.hasStringValue()) {
   
               // Need to break the association w/ original kids
  
  
  
  1.24      +4 -6      xml-xerces/java/src/org/apache/xerces/dom/ParentNode.java
  
  Index: ParentNode.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/ParentNode.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- ParentNode.java	2001/01/26 19:20:21	1.23
  +++ ParentNode.java	2001/02/06 02:05:00	1.24
  @@ -1,4 +1,4 @@
  -/* $Id: ParentNode.java,v 1.23 2001/01/26 19:20:21 lehors Exp $ */
  +/* $Id: ParentNode.java,v 1.24 2001/02/06 02:05:00 lehors Exp $ */
   /*
    * The Apache Software License, Version 1.1
    *
  @@ -161,15 +161,13 @@
        */
       public Node cloneNode(boolean deep) {
       	
  +        if (needsSyncChildren()) {
  +            synchronizeChildren();
  +        }
       	ParentNode newnode = (ParentNode) super.cloneNode(deep);
   
           // set owner document
           newnode.ownerDocument = ownerDocument;
  -
  -        // REVISIT: Do we need to synchronize at this point? -Ac
  -        if (needsSyncChildren()) {
  -            synchronizeChildren();
  -        }
   
       	// Need to break the association w/ original kids
       	newnode.firstChild      = null;
  
  
  

Mime
View raw message