RFR: 8220816: (fs) Files.createDirectory should make it more obvious that it fails when the directory already exists [v2]

Brian Burkhalter bpb at openjdk.org
Tue Nov 18 22:14:23 UTC 2025


On Tue, 18 Nov 2025 22:05:38 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> src/java.base/share/classes/java/nio/file/Files.java line 640:
>> 
>>> 638:      *          when creating the directory
>>> 639:      * @throws  FileAlreadyExistsException
>>> 640:      *          if a directory could not otherwise be created because a file of
>> 
>> Is it worth clarifying ..."file _or directory_"... in the `throws` tag as well?
>
>> Is it worth clarifying ..."file _or directory_"... in the `throws` tag as well?
> 
> Yes, I think so, thanks.

Changed in commit 3af3490.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28378#discussion_r2539779343


More information about the nio-dev mailing list