ilene 2002/12/11 07:20:46
Modified: java/src/org/apache/xpath NodeSetDTM.java
java/src/org/apache/xml/dtm DTMIterator.java
java/src/org/apache/xml/dtm/ref DTMNodeIterator.java
Log:
Just tidying up the javadoc in the previousNode and nextNode methods
and making sure we're testing against DTM.NULL instead of -1.
Revision Changes Path
1.11 +2 -2 xml-xalan/java/src/org/apache/xpath/NodeSetDTM.java
Index: NodeSetDTM.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/NodeSetDTM.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- NodeSetDTM.java 27 Jun 2002 14:50:12 -0000 1.10
+++ NodeSetDTM.java 11 Dec 2002 15:20:46 -0000 1.11
@@ -419,7 +419,7 @@
* iterator in the set. After a DTMIterator is created, the first call
* to nextNode() returns the first node in the set.
* @return The next <code>Node</code> in the set being iterated over, or
- * <code>null</code> if there are no more members in that set.
+ * <code>DTM.NULL</code> if there are no more members in that set.
* @throws DOMException
* INVALID_STATE_ERR: Raised if this method is called after the
* <code>detach</code> method was invoked.
@@ -443,7 +443,7 @@
* Returns the previous node in the set and moves the position of the
* iterator backwards in the set.
* @return The previous <code>Node</code> in the set being iterated over,
- * or<code>null</code> if there are no more members in that set.
+ * or<code>DTM.NULL</code> if there are no more members in that set.
* @throws DOMException
* INVALID_STATE_ERR: Raised if this method is called after the
* <code>detach</code> method was invoked.
1.5 +2 -2 xml-xalan/java/src/org/apache/xml/dtm/DTMIterator.java
Index: DTMIterator.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/dtm/DTMIterator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DTMIterator.java 7 Aug 2001 19:16:42 -0000 1.4
+++ DTMIterator.java 11 Dec 2002 15:20:46 -0000 1.5
@@ -206,7 +206,7 @@
* is rejected by the filters) the first node within its subtree which is
* not filtered out.
* @return The next node handle in the set being iterated over, or
- * -1 if there are no more members in that set.
+ * <code>DTM.NULL</code> if there are no more members in that set.
*/
public int nextNode();
@@ -214,7 +214,7 @@
* Returns the previous node in the set and moves the position of the
* <code>DTMIterator</code> backwards in the set.
* @return The previous node handle in the set being iterated over,
- * or <code>null</code> if there are no more members in that set.
+ * or <code>DTM.NULL</code> if there are no more members in that set.
*/
public int previousNode();
1.5 +3 -1
xml-xalan/java/src/org/apache/xml/dtm/ref/DTMNodeIterator.java
Index: DTMNodeIterator.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/DTMNodeIterator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DTMNodeIterator.java 15 Jun 2001 17:54:12 -0000 1.4
+++ DTMNodeIterator.java 11 Dec 2002 15:20:46 -0000 1.5
@@ -193,7 +193,7 @@
throw new DTMDOMException(DOMException.INVALID_STATE_ERR);
int handle=dtm_iter.nextNode();
- if (handle==-1)
+ if (handle==DTM.NULL)
return null;
return dtm_iter.getDTM(handle).getNode(handle);
}
@@ -211,6 +211,8 @@
throw new DTMDOMException(DOMException.INVALID_STATE_ERR);
int handle=dtm_iter.previousNode();
+ if (handle==DTM.NULL)
+ return null;
return dtm_iter.getDTM(handle).getNode(handle);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]