Return-Path: Delivered-To: apmail-xml-xalan-cvs-archive@xml.apache.org Received: (qmail 30166 invoked by uid 500); 18 Sep 2001 20:14:21 -0000 Mailing-List: contact xalan-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: Delivered-To: mailing list xalan-cvs@xml.apache.org Received: (qmail 30144 invoked from network); 18 Sep 2001 20:14:20 -0000 Date: 18 Sep 2001 20:08:16 -0000 Message-ID: <20010918200816.81269.qmail@icarus.apache.org> From: mmidy@apache.org To: xml-xalan-cvs@apache.org Subject: cvs commit: xml-xalan/java/src/org/apache/xalan/transformer KeyRefIterator.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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 @@ * null 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: xalan-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: xalan-cvs-help@xml.apache.org