RFR: 8020199: (fs) Files.move() throws DirectoryNotEmptyException pointing to wrong directory (win)

Alan Bateman alanb at openjdk.org
Wed Aug 9 14:49:09 UTC 2023


On Tue, 8 Aug 2023 21:04:52 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Amend description of when `DirectoryNotEmptyException` is thrown by `Files::move`.

src/java.base/share/classes/java/nio/file/Files.java line 1414:

> 1412:      *          required to be moved and the target location is on a different
> 1413:      *          {@code FileStore} <i>(optional specific exceptions)</i>
> 1414:      * @throws  AtomicMoveNotSupportedException

I'm not sure about this change to the spec because there may be other reasons why entries might have to be moved, esp. when you get into exotic/custom file systems.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15199#discussion_r1288584588


More information about the nio-dev mailing list