Refactor commons code.

This commit is contained in:
Gary Gregory 2022-04-03 10:57:59 -04:00
parent 777590c82c
commit dd4e7bdc7c
2 changed files with 4 additions and 10 deletions

View File

@ -892,15 +892,14 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
buffer[size++] = 't';
buffer[size++] = 'r';
buffer[size++] = 'u';
buffer[size++] = 'e';
} else {
ensureCapacity(size + 5);
buffer[size++] = 'f';
buffer[size++] = 'a';
buffer[size++] = 'l';
buffer[size++] = 's';
buffer[size++] = 'e';
}
buffer[size++] = 'e';
return this;
}

View File

@ -759,10 +759,6 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
continue;
}
// copy regular character from inside quotes
workArea.append(srcChars[pos++]);
trimStart = workArea.size();
} else {
// Not in quoting mode
@ -797,11 +793,10 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
pos += trimmedLen;
continue;
}
// copy regular character from outside quotes
workArea.append(srcChars[pos++]);
trimStart = workArea.size();
}
// copy regular character from inside quotes
workArea.append(srcChars[pos++]);
trimStart = workArea.size();
}
// return condition when end of string found