RFR: 8376700: java/nio/file/DirectoryStream/SecureDS.java fails AtomicMoveNotSupportedException [v4]
SendaoYan
syan at openjdk.org
Fri Jan 30 00:50:39 UTC 2026
On Thu, 29 Jan 2026 18:49:30 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove stream.close()
>
> test/jdk/java/nio/file/DirectoryStream/SecureDS.java line 24:
>
>> 22: */
>> 23:
>> 24: /* @test id=tmp
>
> Instead of using IDs, it might be better to convert this test to JUnit 5 and use a `ValueSource` but not for this PR.
I will create a new JBS issue to do that after this PR finish.
> test/jdk/java/nio/file/DirectoryStream/SecureDS.java line 333:
>
>> 331: delete(dir1);
>> 332: delete(dir2);
>> 333: stream1.close();
>
> These stream `close()` calls could be eliminated by putting lines 266-269 into a `try()` block.
It seems that we can not only putting lines 266-269 into a `try{}` block, all about the stream1/stream2 should be in the same `try{}` block. So I remove the unnecessary `stream.close()`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29487#discussion_r2744144599
PR Review Comment: https://git.openjdk.org/jdk/pull/29487#discussion_r2744142322
More information about the nio-dev
mailing list