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++] = 't';
buffer[size++] = 'r'; buffer[size++] = 'r';
buffer[size++] = 'u'; buffer[size++] = 'u';
buffer[size++] = 'e';
} else { } else {
ensureCapacity(size + 5); ensureCapacity(size + 5);
buffer[size++] = 'f'; buffer[size++] = 'f';
buffer[size++] = 'a'; buffer[size++] = 'a';
buffer[size++] = 'l'; buffer[size++] = 'l';
buffer[size++] = 's'; buffer[size++] = 's';
buffer[size++] = 'e';
} }
buffer[size++] = 'e';
return this; return this;
} }

View File

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