On Tue, 6 Sep 2022 14:51:20 GMT, Сергей Цыпанов <d...@openjdk.org> wrote:

>> Markus KARG has updated the pull request with a new target base due to a 
>> merge or a rebase. The pull request now contains ten commits:
>> 
>>  - proposal by Alan Bateman
>>  - modified locking
>>  - HexPrinter::transferTo
>>  - using getBufIfOpen() instead of direct buf access
>>  - fixed missing BufferedInputStream
>>  - removed unused code
>>  - test for BufferedInputStream.transferTo
>>  - synchronized BufferedInputStream::transferTo
>>  - BufferedInputStream::transferTo
>
> src/java.base/share/classes/java/io/BufferedInputStream.java line 608:
> 
>> 606:     private long implTransferTo(OutputStream out) throws IOException {
>> 607:         if (getClass() == BufferedInputStream.class
>> 608:                 && ((count - pos) <= 0) && (markpos == -1)) {
> 
> Tiny thing: I think with 3 `&&`s we don't need parenthesis around `((count - 
> pos) <= 0) && (markpos == -1))`. How about to leave leave only the one around 
> `count - pos`?

I was using the exact code proposed by @AlanBateman and I don't dare to touch 
it. ;-)

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

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

Reply via email to