RFR: 8273528: Avoid ByteArrayOutputStream.toByteArray when converting stream to String

Sergey Bylokhov serb at openjdk.java.net
Thu Sep 9 22:41:09 UTC 2021


On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> wrote:

> Using `ByteArrayOutputStream.toString` to convert it's content to a String is cleaner than `new String(out.toByteArray())`. Also it's a bit faster because of one less array copy.

BTW If it is not urgent I suggest to wait 24 hours from the approval before the /integrate, people have different timezones and may not be able to add a comment if any in time.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5355



More information about the security-dev mailing list