bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/22637] java.text.CollationElementIterator.next() is broke


From: gcc-bugzilla at gcc dot gnu dot org
Subject: [Bug classpath/22637] java.text.CollationElementIterator.next() is broken
Date: 16 Oct 2005 01:26:09 -0000

The "pos" field is being incremented before the value of the character at that
position is queried.  Also, this causes a StringIndexOutOfBoundsException for
zero-length strings.

I would suggest changing the method to work as follows:
1. test pos against string length, if at end return NULLORDER
2. get value of character
3. increment pos
4. Compute the return value and return it

I'm using a CVS version of classpath checked out on June 23rd, 2002.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22637





reply via email to

[Prev in Thread] Current Thread [Next in Thread]