Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8294957

Consolidate JDK class files parsing, generating, and transforming (umbrella)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs

      JDK contains multiple libraries for parsing, generating, and transforming class files. Classfile API project goal is to provide JDK-based, accurate, complete, up-to-date, performant API for reading, writing and transforming Java class files.

      Cost of Maintaining ASM Library:

      - Risk of Changes: The ASM library is an external dependency, and updates or changes in its APIs can introduce unforeseen issues or require significant code modifications in our tests.
      - Lack of Reviewers: As the ASM library evolves, finding reviewers familiar with its intricacies becomes challenging, leading to delays in reviewing and merging changes.

      Reasons for Migration:
      - Stability and Consistency: Utilizing the ClassFile API ensures stability and compatibility with the Java platform, reducing the risk of compatibility issues due to external library changes.
      - Sustainability: The ClassFile API is a standard part of Java, making it easier to find reviewers and maintain code consistency across test suites.
      Future Compatibility: As Java evolves, relying on native Java APIs like the ClassFile API ensures future compatibility and reduces technical debt.

      Concerns Addressed:
      - Risk of Changes: By migrating to a standard Java API, we mitigate the risks associated with external library changes and ensure smoother maintenance and updates in the future.
      - Backporting and Compatibility: The use of native Java APIs allows for easier backporting of test fixes and ensures compatibility across Java versions, including preview releases.

      This is an umbrella issue to collect and monitor JDK use cases; each under individual sub-task.

        1.
        java.base java.lang.Module uses ASM to load module-info.class Sub-task Resolved Adam Sotona  
        2.
        Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles Sub-task Resolved Adam Sotona  
        3.
        Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes Sub-task Resolved Adam Sotona  
        4.
        Convert java.base/jdk.internal.module package to use the Classfile API to modify and write module-info.class Sub-task Resolved Adam Sotona  
        5.
        Convert jdk.jartool/sun.tools.jar.FingerPrint to use the ClassFile API to parse JAR entries Sub-task Resolved Adam Sotona  
        6.
        Convert jdk.jdeps javap to use the Classfile API Sub-task Resolved Adam Sotona  
        7.
        jdk.jlink jdk.tools.jimage.JImageTask is using ASM to verify classes Sub-task Resolved Adam Sotona  
        8.
        Convert jdk.jlink internal plugins to use the Classfile API Sub-task Resolved Adam Sotona  
        9.
        Convert jdk.jfr to use the Classfile API for class instrumentation (umbrella) Sub-task Closed Unassigned  
        10.
        Convert jdk.jshell/jdk.jshell.execution.LocalExecutionControl to use the Classfile API to instrument classes Sub-task Resolved Adam Sotona  
        11.
        Convert jdk.compiler javac to use the Classfile API for reading and writing classes Sub-task Open Unassigned  
        12.
        test/hotspot 183 test classes use ASM Sub-task In Progress Unassigned  
        13.
        Convert test/jdk/java tests from ASM library to Classfile API Sub-task Resolved Chen Liang  
        14.
        Convert 5 test/jdk/jdk/jfr tests from ASM library to Classfile API Sub-task Resolved Chen Liang  
        15.
        test/jdk/tools/jlink 3 test classes use ASM library Sub-task Resolved Qing Xiao (Inactive)  
        16.
        test/jdk/java/lang/invoke 15 test classes use experimental bytecode library Sub-task Resolved Mourad Abbay  
        17.
        test/langtools/tools/javac 116 test classes uses com.sun.tools.classfile library Sub-task Resolved Qing Xiao (Inactive)  
        18.
        test/langtools/tools/javap 12 test classes use com.sun.tools.classfile library Sub-task Resolved Qing Xiao (Inactive)  
        19.
        Convert jdk.jlink StringSharingPlugin to use Class File API Sub-task Resolved Qing Xiao (Inactive)  
        20.
        java.base jdk.internal.foreign.abi.BindingSpecializer uses ASM to generate classes Sub-task Resolved Jorn Vernee  
        21.
        Convert Indify tool to Classfile API Sub-task In Progress Oussama Louati  
        22.
        Migrate CreateSymbols tool in make/langtools to Classfile API Sub-task Open Qing Xiao (Inactive)  
        23.
        test/langtools/tools/javac 144 test classes uses com.sun.tools.classfile library Sub-task Resolved Qing Xiao (Inactive)  
        24.
        Convert test/jdk/tools to Classfile API Sub-task Resolved Qing Xiao (Inactive)  
        25.
        Convert Runtime tests to use the ClassFile API instead of ASM Sub-task In Progress Chen Liang  
        26.
        Convert vm.runtime.defmeth related tests to use the ClassFile API Sub-task In Progress Chen Liang  
        27.
        Convert jdk.jdeps jdeprscan and jdeps to use the Classfile API Sub-task Resolved Chen Liang  
        28.
        Convert remaining tests using com.sun.tools.classfile to ClassFile API Sub-task Resolved Chen Liang  
        29.
        Remove preview requirement on tests using the Class-File API Sub-task Closed Unassigned  

            asotona Adam Sotona
            asotona Adam Sotona
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: