Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
csoroiu opened this issue Jan 31, 2017 · 1 comment
Closed

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

csoroiu opened this issue Jan 31, 2017 · 1 comment

Comments

@csoroiu
Copy link
Contributor

csoroiu commented Jan 31, 2017

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.

@luontola
Copy link
Owner

This has been fixed in Retrolambda 2.5.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants