RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher [v6]

Jaikiran Pai jpai at openjdk.org
Thu Jun 12 09:36:34 UTC 2025


On Thu, 12 Jun 2025 09:21:08 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.
>
> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Simplify `FilePublisherTest`

This looks good to me. I don't expect this latest change to cause a failure in CI, but it would be good to have this test run on all platforms before integrating (doesn't have to be the entire tier).

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

Marked as reviewed by jpai (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25662#pullrequestreview-2920296403


More information about the net-dev mailing list