On Mon, 23 Mar 2026 14:15:28 GMT, Jaikiran Pai <[email protected]> wrote:
>> Volkan Yazici has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> More import improvements
>
> test/jdk/java/net/httpclient/HttpRequestBodyPublishers/OfFileChannelTest.java
> line 665:
>
>> 663: try {
>> 664: Files.write(filePath, fileBytes, StandardOpenOption.CREATE);
>> 665: FileChannel fileChannel = FileChannel.open(filePath);
>
> Would this FileChannel need to be closed at some point?
@jaikiran, yes, they will. In the next line, `fileChannel` is passed as the 4th
(`resource`) argument to the `ReplayTarget::new` method. `ReplayTarget`
implements `AutoCloseable` by `resource.close()`, and
`ReplayTestSupport::testReplay` uses replay targets always in a
try-with-resources block.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/30219#discussion_r2975590952