Integrated: 8317128: java/nio/file/Files/CopyAndMove.java failed with AccessDeniedException
Brian Burkhalter
bpb at openjdk.org
Fri Oct 6 17:49:30 UTC 2023
On Fri, 29 Sep 2023 15:57:48 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.
This pull request has now been integrated.
Changeset: 6c6beba2
Author: Brian Burkhalter <bpb at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/6c6beba2569a2f9f3fd5d6988360ffd8680de821
Stats: 29 lines in 2 files changed: 15 ins; 11 del; 3 mod
8317128: java/nio/file/Files/CopyAndMove.java failed with AccessDeniedException
Reviewed-by: alanb, lancea
-------------
PR: https://git.openjdk.org/jdk/pull/15991
More information about the nio-dev
mailing list