On Wed, 11 Jun 2025 12:32:13 GMT, Volkan Yazici <vyaz...@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: > > Fix `FilePublisherTest` test/jdk/java/net/httpclient/FilePublisher/FilePublisherTest.java line 168: > 166: try (FileSystem fs = newZipFs(zipPath)) { > 167: Path fileInZip = zipFsFile(fs); > 168: Files.deleteIfExists(fileInZip); Now that I look at this, perhaps we should just change these 2 lines: Path fileInZip = zipFsFile(fs); Files.deleteIfExists(fileInZip); to: Path fileInZip = fs.getPath("non-existent.txt"); The call to `zipFsFile(...)` creates a ZIP entry within the ZIP and we then delete it immediately here with the deleteIfExists(...) call. At least for this new test, this creation followed by the deletion isn't necessary. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25662#discussion_r2142061997