axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ruchi...@apache.org
Subject svn commit: r359207 - /webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ParentNode.java
Date Tue, 27 Dec 2005 12:29:19 GMT
Author: ruchithf
Date: Tue Dec 27 04:29:12 2005
New Revision: 359207

URL: http://svn.apache.org/viewcvs?rev=359207&view=rev
Log:
Changes from Azze's patch + additional chage to hasChildNodes() to make sure the first child
is build before the check

Modified:
    webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ParentNode.java

Modified: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ParentNode.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ParentNode.java?rev=359207&r1=359206&r2=359207&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ParentNode.java
(original)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ParentNode.java
Tue Dec 27 04:29:12 2005
@@ -50,8 +50,8 @@
 	protected ParentNode() {
 	}
 	
-	///
-	///OMContainer methods
+	// /
+	// /OMContainer methods
 	///
 	
 	public void addChild(OMNode omNode) {
@@ -116,6 +116,9 @@
 	///	
 	
 	public NodeList getChildNodes() {
+		if (!this.done) {
+			this.build();
+		}
 		return new NodeListImpl(this, null,null);
 	}
 	
@@ -131,6 +134,9 @@
 	}
 			
 	public boolean hasChildNodes() {
+        while ((firstChild == null) && !done) {
+            buildNext();
+        }
 		return this.firstChild != null;
 	}
 	



Mime
View raw message