[jdk11u-dev] RFR: 8342075: HttpClient: improve HTTP/2 flow control checks

Alexey Bakhtin abakhtin at openjdk.org
Thu Feb 27 00:07:09 UTC 2025


Please review backport of JDK-8342075
The backport is not clean:

- src/java.net.http/share/classes/module-info.java

The changes are skipped because there are no java.net.http configuration properties definitions in the file. It was added by JDK-8296804 in JDK20 but not backported.

- src/java.net.http/share/classes/jdk/internal/net/http/Stream.java

Comments are not added into Stream::incoming() method because of no JDK-8298340 in JDK11
Fixed instance of pattern, added in JDK14
Fixed string formatting in Stream::windowSizeExceeded

- src/java.net.http/share/classes/jdk/internal/net/http/WindowUpdateSender.java

manual merge because of differences in the import section caused by JDK-8308310

- src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java

Added Http2Connection.java::isOpen method. It was added by 8254786 in JDK19

- test/jdk/java/net/httpclient/GZIPInputStreamTest.java

Changes skipped. This test was added as part of the JDK-8217264, but this functionality was not backported to JDK11

- test/jdk/java/net/httpclient/http2/server/Http2TestExchange.java and test/jdk/java/net/httpclient/http2/server/Http2TestExchangeImpl.java and test/jdk/java/net/httpclient/http2/server/Http2TestServerConnection.java

Test classes are updated from JDK-8335181 with getConnectionKey() implementation

- test/jdk/java/net/httpclient/http2/server/BodyOutputStream.java and test/jdk/java/net/httpclient/http2/server/Http2TestServerConnection.java

These library classes are located in another directory (8295944 is not backported to JDK11).  

- test/jdk/java/net/httpclient/lib/jdk/httpclient/test/lib/http2/ConnectionFlowControlTest.java and test/jdk/java/net/httpclient/lib/jdk/httpclient/test/lib/http2/StreamFlowControlTest.java

Test classes are updated to use ExecutorService::shutdown method to shut down httpclient. These methods are added by JDK-8267140 in JDK21
Fixed instance of pattern, added in JDK14
Fixed build and modules dependencies

All java/net/httpclient jtreg tests are passed

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

Commit messages:
 - Backport b0ac633b2d0076d64b463b2a6ce19abf6b12c50f

Changes: https://git.openjdk.org/jdk11u-dev/pull/3005/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk11u-dev&pr=3005&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8342075
  Stats: 1057 lines in 13 files changed: 1027 ins; 1 del; 29 mod
  Patch: https://git.openjdk.org/jdk11u-dev/pull/3005.diff
  Fetch: git fetch https://git.openjdk.org/jdk11u-dev.git pull/3005/head:pull/3005

PR: https://git.openjdk.org/jdk11u-dev/pull/3005


More information about the jdk-updates-dev mailing list