Non-breaking space causes infinite loop
Brought to you by:
reverendsam
The method tokenizeToArrayList in TokeniserWhitespace.java uses two methods to look at whitespace characters: Character.isWhitespace() and the characters in its delimiters field: "\r\n\t \u00A0". Unfortunately, isWhitespace() does not regard a non-breaking space (\u00A0) as a whitespace character, which ends up causing an infinite loop when tokenising a string.
The fix is to test for a non-breaking space character when testing isWhitespace() on line 116:
if (Character.isWhitespace(ch) || (int)ch == 160) {
curPos++;
}