On Thu, 1 Jun 2023 19:23:05 GMT, Adam Sotona <[email protected]> wrote:
>> src/java.base/share/classes/java/lang/Module.java line 1593:
>>
>>> 1591: private Class<?> loadModuleInfoClass(InputStream in) throws
>>> IOException {
>>> 1592: final String MODULE_INFO = "module-info";
>>> 1593: var cc =
>>> Classfile.of(Classfile.ConstantPoolSharingOption.DO_NOT_SHARE_CONSTANT_POOL);
>>
>> This `cc` can be stored in a static final field instead.
>
> Yes, we can avoid repeated construction of default class hierarchy resolver
> here.
In this situation the ClassHierarchyResolver is never used and have no caching
function.
Adding static field with initializer does not make much sense here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14180#discussion_r1214214987