Replace two usages of StringBuffer with StringBuilder.

This commit is contained in:
Andreas Schildbach 2019-10-15 23:58:17 +02:00
parent 39dba0d976
commit 49f6572fe4
2 changed files with 2 additions and 2 deletions

View file

@ -92,7 +92,7 @@ final public class CharQueue {
*/ */
@Override @Override
public String toString() { public String toString() {
StringBuffer queueString = new StringBuffer(elementCount); StringBuilder queueString = new StringBuilder(elementCount);
if (queueFront < queueRear) { if (queueFront < queueRear) {
queueString.append(queueElements, queueFront, elementCount); queueString.append(queueElements, queueFront, elementCount);
} else { } else {

View file

@ -85,7 +85,7 @@ public class StringReplaceReader extends FilterReader implements Cloneable {
* Returns the entire contents of the input stream. * Returns the entire contents of the input stream.
*/ */
public String contents() throws IOException { public String contents() throws IOException {
StringBuffer contents = new StringBuffer(1024); StringBuilder contents = new StringBuilder(1024);
int readSize = 512; int readSize = 512;
char[] filteredChars = new char[readSize]; char[] filteredChars = new char[readSize];