RFR: 8321561: (fs) Add an API note to Files.move clarifying possible non-atomic behavior [v2]
Brian Burkhalter
bpb at openjdk.org
Thu Jan 11 19:42:23 UTC 2024
On Thu, 11 Jan 2024 14:54:36 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8321561: Update verbiage instead of adding API note
>
> src/java.base/share/classes/java/nio/file/Files.java line 1400:
>
>> 1398: * copying or renaming, then a {@code FileAlreadyExistsException} may be
>> 1399: * thrown despite the {@code REPLACE_EXISTING} option having been specified.
>> 1400: *
>
> I wonder if it might be better expand the description of REPLACE_EXISTING. That is, the existing paragraph could be expanded to say that if ATOMIC_MOVE is not specified then the checking the check for an existing file and the move is not atomic with respect to other filesystem activities.
Done in 22d13f6c29aaafa56b51e0f03c4469d7d2d25f6b. I put the verbiage after the options table as REPLACE_EXISTING is ignored if ATOMIC_MOVE is specified so it did not seem accurate to put the text in the row describing the former option.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17061#discussion_r1449313687
More information about the nio-dev
mailing list