java.lang.classfile.Attributes class performs a lot of static initializations

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 23
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      java.lang.classfile.Attributes has a static field for each predefined AttributeMapper and an extra field PREDEFINED_ATTRIBUTES initialized with a set of the mappers.

      Exposing predefined mappers as static fields requires a lot of static initialization in one of the class involved in the JDK bootstrap.

      In this enhancement I propose to expose all the mappers in a form of static methods to allow lazy initialization.

            Assignee:
            Adam Sotona
            Reporter:
            Adam Sotona
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: