RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v2]
Adam Sotona
asotona at openjdk.org
Fri Jun 2 10:47:06 UTC 2023
On Thu, 1 Jun 2023 19:23:05 GMT, Adam Sotona <asotona at openjdk.org> 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
More information about the core-libs-dev
mailing list