mmidy 01/09/18 13:08:16 Modified: java/src/org/apache/xalan/transformer KeyRefIterator.java Log: Bugzilla 3618: Check cache before anything else when getting the next node in the iterator. Revision Changes Path 1.12 +9 -9 xml-xalan/java/src/org/apache/xalan/transformer/KeyRefIterator.java Index: KeyRefIterator.java =================================================================== RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/KeyRefIterator.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- KeyRefIterator.java 2001/08/21 03:06:45 1.11 +++ KeyRefIterator.java 2001/09/18 20:08:16 1.12 @@ -132,13 +132,7 @@ * <code>null</code> if there are no more members in that set. */ public int nextNode() - { - - if (m_foundLast) - { - m_lastFetched = DTM.NULL; - return DTM.NULL; - } + { // If the cache is on, and the node has already been found, then // just return from the list. @@ -149,14 +143,20 @@ // the positions it indicates may not be associated with the // current iterator. if ((null != m_cachedNodes) - && (m_next < m_cachedNodes.size())) + && (m_next < m_cachedNodes.size())) { int next = m_cachedNodes.elementAt(m_next); this.setCurrentPos(++m_next); m_lastFetched = next; return next; - } + } + + if (m_foundLast) + { + m_lastFetched = DTM.NULL; + return DTM.NULL; + } int next = DTM.NULL; if ( m_ki.getLookForMoreNodes()) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]