RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v2]
Mandy Chung
mchung at openjdk.org
Fri Mar 24 23:00:17 UTC 2023
On Fri, 24 Mar 2023 20:54:25 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Mandy Chung has updated the pull request incrementally with one additional commit since the last revision:
>>
>> avoid another map lookup
>
> src/java.base/share/classes/java/lang/invoke/ClassFileDumper.java line 88:
>
>> 86: dir = validateDumpDir(Path.of(path.trim()));
>> 87: }
>> 88: DUMPER_MAP.putIfAbsent(key, new ClassFileDumper(key, dir));
>
> Can just return `putIfAbsent` result to avoid another map lookup
This is not performance critical. I updated it anyway.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13182#discussion_r1148129324
More information about the security-dev
mailing list