Construct StringWriter instances with appropriate initial size

Closes gh-25789
This commit is contained in:
Juergen Hoeller
2020-09-18 18:14:57 +02:00
parent a6daed1b71
commit 9dfef59af2
6 changed files with 18 additions and 19 deletions

View File

@@ -218,7 +218,7 @@ public abstract class FileCopyUtils {
return "";
}
StringWriter out = new StringWriter();
StringWriter out = new StringWriter(BUFFER_SIZE);
copy(in, out);
return out.toString();
}