This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[patch] Fix CollationElementIterator.java::reset()
- From: Jerry Quinn <jlquinn at optonline dot net>
- To: java-patches at gcc dot gnu dot org
- Date: Thu, 22 Apr 2004 02:09:40 -0400
- Subject: [patch] Fix CollationElementIterator.java::reset()
If the iterator has been used previously, lookahead might be set, so
reset() followed by next() could return a stale value.
It seems trivial to me, but I'd rather someone else ok it.
2004-04-22 Jerry Quinn <jlquinn@optonline.net>
* java/text/CollationElementIterator.java (reset): Reset
lookahead variables.
*** CollationElementIterator.java.~1.12.~ Thu Apr 22 01:33:21 2004
--- CollationElementIterator.java Thu Apr 22 02:03:39 2004
***************
*** 134,139 ****
--- 134,141 ----
public void reset()
{
textIndex = 0;
+ lookahead_set = false;
+ lookahead = 0;
}
/**