[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-cvs
Subject:    cvs commit: xml-xerces/java/src/org/apache/xerces/dom NodeImpl.java ChildAndParentNode.java ParentNo
From:       lehors () locus ! apache ! org
Date:       2000-04-28 19:49:23
[Download RAW message or body]

lehors      00/04/28 12:49:23

  Modified:    java/src/org/apache/xerces/dom NodeImpl.java
                        ChildAndParentNode.java ParentNode.java
  Log:
  fixed getOwnerDocument which returned null for Document children
  
  Revision  Changes    Path
  1.17      +3 -2      xml-xerces/java/src/org/apache/xerces/dom/NodeImpl.java
  
  Index: NodeImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/NodeImpl.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- NodeImpl.java	2000/04/10 22:08:11	1.16
  +++ NodeImpl.java	2000/04/28 19:49:19	1.17
  @@ -283,14 +283,15 @@
           // if we have an owner simply forward the request
           // otherwise ownerNode is our ownerDocument
           if (owned()) {
  -            return ownerNode.getOwnerDocument();
  +            return ownerNode.ownerDocument();
           } else {
               return (Document) ownerNode;
           }
       }
   
       /**
  -     * same as above but returns internal type
  +     * same as above but returns internal type and this one is not overridden
  +     * by DocumentImpl to return null 
        */
       DocumentImpl ownerDocument() {
           // if we have an owner simply forward the request
  
  
  
  1.2       +4 -3      xml-xerces/java/src/org/apache/xerces/dom/ChildAndParentNode.java
  
  Index: ChildAndParentNode.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/ChildAndParentNode.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ChildAndParentNode.java	2000/04/10 22:08:09	1.1
  +++ ChildAndParentNode.java	2000/04/28 19:49:20	1.2
  @@ -1,4 +1,4 @@
  -/* $Id: ChildAndParentNode.java,v 1.1 2000/04/10 22:08:09 lehors Exp $ */
  +/* $Id: ChildAndParentNode.java,v 1.2 2000/04/28 19:49:20 lehors Exp $ */
   /*
    * The Apache Software License, Version 1.1
    *
  @@ -200,7 +200,8 @@
       }
   
       /**
  -     * same as above but returns internal type
  +     * same as above but returns internal type and this one is not overridden
  +     * by DocumentImpl to return null
        */
       DocumentImpl ownerDocument() {
           return ownerDocument;
  @@ -265,7 +266,7 @@
   
       }   // getFirstChild():Node
   
  -    /** The first child of this Node, or null if none. */
  +    /** The last child of this Node, or null if none. */
       public Node getLastChild() {
   
           if (syncChildren()) {
  
  
  
  1.2       +7 -4      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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParentNode.java	2000/04/10 22:08:11	1.1
  +++ ParentNode.java	2000/04/28 19:49:20	1.2
  @@ -1,9 +1,9 @@
  -/* $Id: ParentNode.java,v 1.1 2000/04/10 22:08:11 lehors Exp $ */
  +/* $Id: ParentNode.java,v 1.2 2000/04/28 19:49:20 lehors Exp $ */
   /*
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -210,7 +210,8 @@
       }
   
       /**
  -     * same as above but returns internal type
  +     * same as above but returns internal type and this one is not overridden
  +     * by DocumentImpl to return null
        */
       DocumentImpl ownerDocument() {
           return ownerDocument;
  @@ -267,6 +268,7 @@
   
       /** The first child of this Node, or null if none. */
       public Node getFirstChild() {
  +
           if (syncChildren()) {
               synchronizeChildren();
           }
  @@ -274,8 +276,9 @@
   
       }   // getFirstChild():Node
   
  -    /** The first child of this Node, or null if none. */
  +    /** The last child of this Node, or null if none. */
       public Node getLastChild() {
  +
           if (syncChildren()) {
               synchronizeChildren();
           }
  
  
  

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic