Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8688

AsmDecompiler.parseClass fails against a Java 11 JEP 181 class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.0
    • 3.0.0-alpha-4
    • bytecode
    • None

    Description

      If AsmDecompiler.parseClass is invoked on Java 11 for a class that already uses nest-based access control, parsing with asm (on master) will fail with an UnsupportedOperationException in org.objectweb.asm.ClassVisitor#visitNestMemberExperimental or visitNestHostExperimental.

      A trivial fix is to bump org.codehaus.groovy.control.CompilerConfiguration#ASM_API_VERSION to ASM7_EXPERIMENTAL with asm 6.2.

      For the 2.5.x-branch, an upgrade from asm 6.1.1 to 6.2 is necessary.

       

      PR for GROOVY_2_5_x branch

      PR for master branch

      ./gradlew test is clean for both branches.

       

      Side note: I've added the maven plugin to allow deployment of the artifacts into the local maven repo. I suspect, it should to removed from the PRs?

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              snazy Robert Stupp
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: