RFR: 8289572: InputStream wrapping with BufferedInputStream is redundant in HttpTimestamper

Сергей Цыпанов duke at openjdk.org
Fri Jul 1 08:16:20 UTC 2022


In case we read all bytes from an `InputStream` we don't need wrapping with `BufferedInputStream` as the bytes are not written into internal buffer. With removal of redundant buffer we save 8 kB of allocated memory.

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

Commit messages:
 - 8289572: InputStream wrapping with BufferedInputStream is redundant in HttpTimestamper

Changes: https://git.openjdk.org/jdk/pull/9343/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9343&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8289572
  Stats: 6 lines in 1 file changed: 2 ins; 1 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/9343.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9343/head:pull/9343

PR: https://git.openjdk.org/jdk/pull/9343



More information about the security-dev mailing list