On Sat, 13 Mar 2021 22:29:23 GMT, Сергей Цыпанов 
<github.com+10835776+stsypa...@openjdk.org> wrote:

> In some cases wrapping of `InputStream` with `BufferedInputStream` is 
> redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which does 
> not require any buffer having one within.
> 
> Other cases are related to reading either a byte or short `byte[]`: in both 
> cases `BufferedInputStream.fill()` will be called resulting in load of much 
> bigger amount of data (8192 by default) than required.

This pull request has now been integrated.

Changeset: 1a681fa7
Author:    Sergey Tsypanov <sergei.tsypa...@yandex.ru>
Committer: Aleksey Shipilev <sh...@openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/1a681fa7
Stats:     12 lines in 2 files changed: 2 ins; 5 del; 5 mod

8263560: Remove needless wrapping with BufferedInputStream

Reviewed-by: prr, alanb, dfuchs, serb

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

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

Reply via email to