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

2021-09-09 Thread Sergey Bylokhov
On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov 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 f

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

2021-09-09 Thread Alexey Ivanov
On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov 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. Marked as reviewed by aivanov (Reviewer). -

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

2021-09-09 Thread Сергей Цыпанов
On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov 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. Marked as reviewed by stsypa...@github.com (no known

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

2021-09-09 Thread Sergey Bylokhov
On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov 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. Marked as reviewed by serb (Reviewer).

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

2021-09-09 Thread Brian Burkhalter
On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov 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. Marked as reviewed by bpb (Reviewer). -

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

2021-09-09 Thread Xue-Lei Andrew Fan
On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov 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. Nice catch. The update looks safe and good to me.

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

2021-09-09 Thread Sergey Bylokhov
On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov 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. Looks fine - PR: https://git.openjdk.j

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

2021-09-09 Thread Andrey Turbanov
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. - Commit messages: - [PATCH] Use ByteArrayOutputStream.toString to convert its content to the String