RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v6]
Mandy Chung
mchung at openjdk.org
Mon Apr 3 22:09:37 UTC 2023
On Mon, 3 Apr 2023 21:05:07 GMT, Rémi Forax <forax at openjdk.org> 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
More information about the core-libs-dev
mailing list