bug-classpath
[Top][All Lists]
Advanced

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

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


From: gcc-bugzilla at gcc dot gnu dot org
Subject: [Bug classpath/22636] java.text.CollationElementIterator.next() is broken
Date: 16 Oct 2005 01:26:08 -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.


------- Comment #1 from from-classpath at savannah dot gnu dot org  2002-07-02 
18:51 -------
Duplicate of 744


------- Comment #2 from from-classpath at savannah dot gnu dot org  2003-01-25 
22:25 -------
Fixed by Julian Dolby, checked into CVS on 12/01/2002.  I've created a Mauve
test for this.


-- 


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





reply via email to

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