Skip to content

Jdk 9 support - skip module-info.class #122

Closed
@csoroiu

Description

@csoroiu

I created a project that compiles with maven using indications from:
http://maven.apache.org/plugins/maven-compiler-plugin/examples/module-info.html

Basically, after doing that the target/classes folder contains the:

  • module-info.class file which has the bytecode version defined as: 0x35 (53 - Java 9)
  • all the other classes have the bytecode version 0x34 (52 - Java 8)

Retrolambda fails with the exception:

java.lang.IllegalArgumentException
    at net.orfjackal.retrolambda.asm.ClassReader.<init>(ClassReader.java:185)
    at net.orfjackal.retrolambda.asm.ClassReader.<init>(ClassReader.java:168)
    at net.orfjackal.retrolambda.interfaces.ClassAnalyzer.analyze(ClassAnalyzer.java:23)
    at net.orfjackal.retrolambda.Retrolambda$1.visitClass(Retrolambda.java:62)
    at net.orfjackal.retrolambda.files.ClasspathVisitor.visitFile(ClasspathVisitor.java:29)
    at net.orfjackal.retrolambda.files.ClasspathVisitor.visitFile(ClasspathVisitor.java:11)
    at java.nio.file.Files.walkFileTree(Files.java:2670)
    at java.nio.file.Files.walkFileTree(Files.java:2742)
    at net.orfjackal.retrolambda.Retrolambda.visitFiles(Retrolambda.java:98)
    at net.orfjackal.retrolambda.Retrolambda.run(Retrolambda.java:59)
    at net.orfjackal.retrolambda.Main.main(Main.java:28)

The failure is due to the asm library, but in any case the module-info.class file should not be converted as it is not interpreted by Java 8 or lower.
If I exclude the module-info.java file from build everything works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions