Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v5]

2021-03-15 Thread Сергей Цыпанов
On Mon, 15 Mar 2021 15:04:49 GMT, Daniel Fuchs wrote: >> Сергей Цыпанов has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix error message > > src/java.base/share/classes/sun/net/www/http/HttpClient.java line 434: > >> 432:

Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v5]

2021-03-15 Thread Daniel Fuchs
On Mon, 15 Mar 2021 12:19:19 GMT, Сергей Цыпанов 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

Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v5]

2021-03-15 Thread Alan Bateman
On Mon, 15 Mar 2021 12:19:19 GMT, Сергей Цыпанов 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

Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v5]

2021-03-15 Thread Сергей Цыпанов
On Mon, 15 Mar 2021 11:41:07 GMT, Alan Bateman wrote: >> Done > >> Done > > I think I'd prefer if the exception message would say that the JMOD is > invalid or that the JMOD file is truncated (because I don't think anyone > seeing this exception will know anything about the header). Fixed

Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v5]

2021-03-15 Thread Сергей Цыпанов
> 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