zongaro 2004/02/23 20:22:13
Modified: java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
Log:
Part of patch for bug report 24985. Ensure that m_size is set to zero in
setStartNode methods of AncestorIterator and TypedAncestorIterator. The way
getLast() is implemented resulted in setStartNode being called twice in
some circumstances, with the nodes from the second call being included as
additional (though duplicate) ancestors. Clearing m_size avoids that.
Reviewed by Morris Kwan (mkwan () ca ! ibm ! com).
Revision Changes Path
1.10 +3 -1
xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java
Index: SAX2DTM2.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- SAX2DTM2.java 21 Feb 2004 00:42:51 -0000 1.9
+++ SAX2DTM2.java 24 Feb 2004 04:22:12 -0000 1.10
@@ -1292,6 +1292,7 @@
if (_isRestartable)
{
int nodeID = makeNodeIdentity(node);
+ m_size = 0;
if (nodeID == DTM.NULL) {
_currentNode = DTM.NULL;
@@ -1418,6 +1419,7 @@
if (_isRestartable)
{
int nodeID = makeNodeIdentity(node);
+ m_size = 0;
if (nodeID == DTM.NULL) {
_currentNode = DTM.NULL;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]