StringIndexOutOfBoundsException in TextUtilities.java
Posted: Tue Nov 22, 2005 1:58 pm
Hi all I am posting this to know if anyone has suffered the same problem.
In the TextUtilities.java line number 250
I had to inverse the tests because if 'current' is greater than text.length(), text.charAt(current) is called, thus throwing the exception 'StringIndexOutOfBoundsException'
like so...
Like this I do not run into the problem.
Well maybe you knew about it... just wanted to let you know in case you did not.
cheers,
Christian Giacomi
In the TextUtilities.java line number 250
Code: Select all
while (text.charAt(current) == '\n' && current < text.length()) {
current++;
}
like so...
Code: Select all
while (current < text.length() && text.charAt(current) == '\n') {
current++;
}
Well maybe you knew about it... just wanted to let you know in case you did not.
cheers,
Christian Giacomi