RFR: 8073061: (fs) Files.copy(foo, bar, REPLACE_EXISTING) deletes bar even if foo is not readable [v2]
Brian Burkhalter
bpb at openjdk.org
Tue Sep 5 17:05:33 UTC 2023
On Tue, 5 Sep 2023 06:49:40 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8073061: Check file system access only for move; add move sub-test
>
> src/java.base/share/classes/java/nio/file/CopyMoveHelper.java line 136:
>
>> 134: // First ensure source can be read
>> 135: source.getFileSystem().provider().checkAccess(source,
>> 136: AccessMode.READ);
>
> This looks right for the cross-provider case. Minor nit is that you don't ned the line break here. Also the existing comments started in lower case.
Fixed in e226096d15b47bee7cee20ec2994bca93a071433.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15501#discussion_r1316158145
More information about the nio-dev
mailing list