8273059: Redundant Math.min call in Http2ClientImpl#getConnectionWindowSize
Reviewed-by: dfuchs
This commit is contained in:
parent
f55d5ab517
commit
16e83058ca
src/java.net.http/share/classes/jdk/internal/net/http
@ -237,8 +237,7 @@ class Http2ClientImpl {
|
||||
|
||||
// The default is the max between the stream window size
|
||||
// and the connection window size.
|
||||
int defaultValue = Math.min(Integer.MAX_VALUE,
|
||||
Math.max(streamWindow, K*K*32));
|
||||
int defaultValue = Math.max(streamWindow, K*K*32);
|
||||
|
||||
return getParameter(
|
||||
"jdk.httpclient.connectionWindowSize",
|
||||
|
@ -489,7 +489,6 @@ class ResponseContent {
|
||||
debug.log("already closed: " + closedExceptionally);
|
||||
return;
|
||||
}
|
||||
boolean completed = false;
|
||||
try {
|
||||
if (debug.on())
|
||||
debug.log("Parser got %d bytes ", b.remaining());
|
||||
@ -506,9 +505,7 @@ class ResponseContent {
|
||||
} catch (Throwable t) {
|
||||
if (debug.on()) debug.log("Unexpected exception", t);
|
||||
closedExceptionally = t;
|
||||
if (!completed) {
|
||||
onComplete.accept(t);
|
||||
}
|
||||
onComplete.accept(t);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user