On Mon, 3 Apr 2023 21:05:07 GMT, Rémi Forax <[email protected]> wrote:
>> Mandy Chung has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> comments from Jorn Vernee
>
> src/java.base/share/classes/jdk/internal/util/ClassFileDumper.java line 199:
>
>> 197: @Override
>> 198: public Path run() {
>> 199: if (!Files.exists(path)) {
>
> I do not think this is necessary, Files.createDirectories() already only
> create directories if they do not exist.
> Moreover, someone can change the state of the files in between the two calls
> (Files.exists and Files.createDirectories) given that those two calls are not
> atomic from the filesystem POV.
that's right. updated
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13182#discussion_r1156495833