RFR: 8349812: (fs) Files.newByteChannel with empty path name and CREATE_NEW throws unexpected exception [v2]
Maxim Kartashev
mkartashev at openjdk.org
Wed Feb 12 10:13:27 UTC 2025
On Wed, 12 Feb 2025 09:24:03 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Updated the copyright year and added the bugid to the test
>
> test/jdk/java/nio/file/Files/SBC.java line 433:
>
>> 431: Files.newByteChannel(Path.of(""), opts);
>> 432: throw new RuntimeException("FileAlreadyExistsException expected");
>> 433: } catch (FileAlreadyExistsException x) { }
>
> While WRITE + CREATE_NEW are the options to tickle the bug, I think emptyPathTest should be expanded to test over combinations of open options. There are several code paths with options such as O_NOFOLLOW and DELETE_ON_CLOSE that will also need to be tested.
I extended the test a bit. Have a look, please.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23560#discussion_r1952353375
More information about the nio-dev
mailing list