You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ru...@apache.org on 2005/12/27 13:29:19 UTC
svn commit: r359207 -
/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ParentNode.java
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;
}