RFR: 8273059: Redundant Math.min call in Http2ClientImpl#getConnectionWindowSize [v2]

Daniel Fuchs dfuchs at openjdk.java.net
Fri Aug 27 14:15:27 UTC 2021


On Fri, 27 Aug 2021 13:28:51 GMT, Michael McMahon <michaelm at openjdk.org> wrote:

>> Hi,
>> 
>> Could I get the following trivial change reviewed please?
>> It removes a redundant call to Math.min(Integer.MAX_VALUE, ....)
>> 
>> Thanks,
>> Michael.
>
> Michael McMahon has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Removed second chunk of redundant code

src/java.net.http/share/classes/jdk/internal/net/http/ResponseContent.java line 510:

> 508:                 closedExceptionally = t;
> 509:                 if (!completed) {
> 510:                     onComplete.accept(t);

You need to keep line 510 - since `completed` is always false this line should be executed always.

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

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


More information about the net-dev mailing list