RFR: 8377796: java.net.http.HttpClient.send() and sendAsync() never complete when BodyHandler.apply() returns null

Jaikiran Pai jpai at openjdk.org
Thu Feb 12 13:50:08 UTC 2026


Can I please get a review of this change which proposes to address the issue noted in https://bugs.openjdk.org/browse/JDK-8377796?

The change here asserts that if `BodyHandler.apply()` returns `null`, then the HTTP request completes exceptionally. A new test has been introduced to reproduce the issue and verify the fix.

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

Commit messages:
 - add a test
 - 8377796: java.net.http.HttpClient.send() and sendAsync() never complete when BodyHandler.apply() returns null

Changes: https://git.openjdk.org/jdk/pull/29691/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29691&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8377796
  Stats: 268 lines in 4 files changed: 265 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/29691.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29691/head:pull/29691

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


More information about the net-dev mailing list