RFR: 8317128: java/nio/file/Files/CopyAndMove.java failed with AccessDeniedException [v2]

Alan Bateman alanb at openjdk.org
Mon Oct 2 19:46:22 UTC 2023


On Mon, 2 Oct 2023 18:51:02 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> The change #15501 removed explicit throwing of a `FileAlreadyExistsException` in `copyToForeignTarget` for non-directories when the target exists and `REPLACE_EXISTING` is not specified, instead relying on `FileChannel.open` eventually to throw this exception. The test, however, reuses the same file path, and on Windows `CreateFile`, which is invoked by `open`, can throw an `AccessDeniedException` if the file exists and has been marked for deletion but not yet actually deleted. This change proposes to reinstate explicitly throwing a FAEE.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8317128: Remove replaceExistingOrEmpty method

Marked as reviewed by alanb (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/15991#pullrequestreview-1653381715


More information about the nio-dev mailing list