RFR: 8367067: Improve exception handling in HttpRequest.BodyPublishers [v3]
Jaikiran Pai
jpai at openjdk.org
Fri Sep 19 06:42:41 UTC 2025
On Thu, 18 Sep 2025 12:46:43 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> Improves exception handling of built-in `HttpClient.BodyPublisher`s to ensure exceptions get propagated in a way compliant with the reactive specification.
>
> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix `FileChannelPublisherTest` failures
test/jdk/java/net/httpclient/HttpRequestBodyPublishers/OfFileTest.java line 63:
> 61: public class OfFileTest {
> 62:
> 63: private static final Path DEFAULT_FS_DIR = Path.of(System.getProperty("java.io.tmpdir"));
Is it intentional to use `java.io.tmpdir` as the Path instead of the test's scratch dir - `Path.of(".")`?
test/jdk/java/net/httpclient/HttpRequestBodyPublishers/OfFileTest.java line 72:
> 70: try {
> 71: Path zipFile = DEFAULT_FS_DIR.resolve("file.zip");
> 72: FileSystem zipFS = FileSystems.newFileSystem(zipFile, Map.of("create", "true"));
This can lead to the `FileSystem` not being closed even after the test completes. I think we should move out the `FileSystem` instance out of this method into a class level field which can then be closed when the test is done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26876#discussion_r2361940787
PR Review Comment: https://git.openjdk.org/jdk/pull/26876#discussion_r2361943150
More information about the net-dev
mailing list