RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher

Volkan Yazici vyazici at openjdk.org
Thu Jun 5 13:36:00 UTC 2025


Simplifies content streaming for `HttpRequest.BodyPublishers::ofFile(Path)`, which delegates to `RequestPublishers.FilePublisher::create(Path)`. This effectively replaces all usages of `FileInputStream::new` in `HttpClient` with `Files::newInputStream(Path)`. See the JBS ticket description for the full story.

Also removing certain test files which were rendered redundant after `SecurityManager` removal. We do this in this PR, since tests were added due to touched lines.

`tier1,2` results on b5f3c8dc6f4 are attached to the ticket.

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

Commit messages:
 - Remove redundant tests
 - Remove redundant OIO usage in `RequestPublishers`

Changes: https://git.openjdk.org/jdk/pull/25662/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25662&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8358688
  Stats: 744 lines in 3 files changed: 10 ins; 731 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/25662.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25662/head:pull/25662

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


More information about the net-dev mailing list