[OpenJDK 2D-Dev] Integrated: 8263560: Remove needless wrapping with BufferedInputStream

Сергей Цыпанов github.com+10835776+stsypanov at openjdk.java.net
Tue Mar 30 06:52:43 UTC 2021


On Sat, 13 Mar 2021 22:29:23 GMT, Сергей Цыпанов <github.com+10835776+stsypanov at 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.tsypanov at yandex.ru>
Committer: Aleksey Shipilev <shade at 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


More information about the 2d-dev mailing list