Without this line the code infinite loops. With it the tests still fail, but a failure is nicer than an infinite loop.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@138006 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2004-12-25 20:30:16 +00:00
parent 91e2e8e838
commit bee437f63a
1 changed files with 2 additions and 1 deletions

View File

@ -73,7 +73,7 @@ import java.util.ListIterator;
* @author Stephen Colebourne
* @author Gary D. Gregory
* @since 2.1
* @version $Id: StrTokenizer.java,v 1.2 2004/12/23 18:55:48 mattinger Exp $
* @version $Id: StrTokenizer.java,v 1.3 2004/12/25 20:30:16 bayard Exp $
*/
public class StrTokenizer implements ListIterator, Cloneable {
@ -705,6 +705,7 @@ public class StrTokenizer implements ListIterator, Cloneable {
int delimLen = 0;
int quoteLen = 0;
while (start < len &&
(ignoreLen = ignored.isMatch(chars, len, start)) >= 1 &&
(delimLen = delim.isMatch(chars, len, start)) < 1 &&
(quoteLen = quote.isMatch(chars, len, start)) < 1) {
start += ignoreLen;