On Thu, 1 Jun 2023 19:25:19 GMT, Adam Sotona <asot...@openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/classfile/Classfile.java line 55: >> >>> 53: >>> 54: static Classfile of() { >>> 55: return new ClassfileImpl(); >> >> We can create a static final field in `ClassfileImpl` holding a default >> instance equivalent to that created by `new ClassfileImpl()` and have the >> `of()` factory return that instance instead. > > Global static default context will hold global shared cached class hierarchy > resolver and that we want to avoid. As the default CHR stays static instance and it is no more cached, we can have also static holder for the default Classfile instance now. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14180#discussion_r1229182694