Fix off-by-one error in DelimitedLineTokenizer on blank strings
There is currently a bug causing an ArrayIndexOutOfBoundsException when trying to tokenize a blank string with more than two characters
This commit is contained in:
committed by
Michael Minella
parent
f6f01b5bb1
commit
96883023b9
@@ -211,7 +211,7 @@ public class DelimitedLineTokenizer extends AbstractLineTokenizer
|
||||
int start = offset;
|
||||
int len = count;
|
||||
|
||||
while ((start < (start + len)) && (chars[start] <= ' ')) {
|
||||
while ((start < (start + len - 1)) && (chars[start] <= ' ')) {
|
||||
start++;
|
||||
len--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user