StringIndexOutOfBoundsException in

A discussion forum for the JCommon class library.

StringIndexOutOfBoundsException in

Postby ChristianGiacomi » Tue Nov 22, 2005 1:58 pm

Hi all I am posting this to know if anyone has suffered the same problem.

In the line number 250

Code: Select all
while (text.charAt(current) == '\n' && current < text.length()) {

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...

Code: Select all
while (current < text.length() && text.charAt(current) == '\n') {

Like this I do not run into the problem. :roll:
Well maybe you knew about it... just wanted to let you know in case you did not.

Christian Giacomi

Postby Taqua » Tue Nov 22, 2005 11:38 pm


we were not aware of that bug (leaving known bugs unfixed is considered impolite :)). Thanks for the report - the fix is now in the CVS.

JFreeReport Project Leader
Posts: 698
Joined: Fri Mar 14, 2003 3:34 pm

Postby ChristianGiacomi » Fri Nov 25, 2005 3:40 pm

:D Glad to be of help...

Thank you (and all those who particapate) for the incredible work.

Return to JCommon

Who is online

Users browsing this forum: No registered users and 1 guest