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

Volkan Yazici vyazici at openjdk.org
Thu Jun 12 17:13:37 UTC 2025


On Thu, 5 Jun 2025 13:30:10 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: 610a18e7
Author:    Volkan Yazici <vyazici at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/610a18e7b3bc9680031a2ba608b89ee6fdec795c
Stats:     74 lines in 3 files changed: 30 ins; 35 del; 9 mod

8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher

Reviewed-by: dfuchs, jpai

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

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


More information about the net-dev mailing list