Refactor commons code.
This commit is contained in:
parent
777590c82c
commit
dd4e7bdc7c
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue