peichhorn / lombok-pg

Collection of lombok extensions
http://peichhorn.github.com/lombok-pg/
Other
326 stars 44 forks source link

Java 7 compatibility #143

Open awhitford opened 10 years ago

awhitford commented 10 years ago

I have a sample project that uses lombok-pg with lombok 1.12.2 and it is failing to build using Java 7. The root issue has been traced to some old code in lombok-pg.

You can find some background here: https://groups.google.com/forum/#!topic/project-lombok/UdvLbP-QJuI

I suggest adding oraclejdk7 to your travis configuration so that you can ensure both Java 6 and Java 7 compatibility.

The error I am getting is as follows:

[ERROR] Failed to execute goal org.projectlombok:lombok-maven-plugin:1.12.2.1-SNAPSHOT:delombok (delombok) on project test-maven-lombok: Execution delombok of goal org.projectlombok:lombok-maven-plugin:1.12.2.1-SNAPSHOT:delombok failed: An API incompatibility was encountered while executing org.projectlombok:lombok-maven-plugin:1.12.2.1-SNAPSHOT:delombok: java.lang.VerifyError: Bad type on operand stack [ERROR] Exception Details: [ERROR] Location: [ERROR] lombok/delombok/Delombok.delombok()Z @222: invokevirtual [ERROR] Reason: [ERROR] Type 'com/sun/tools/javac/comp/Todo' (current frame, stack[2]) is not assignable to 'com/sun/tools/javac/util/ListBuffer' [ERROR] Current Frame: [ERROR] bci: @222 [ERROR] flags: { } [ERROR] locals: { 'lombok/delombok/Delombok', 'lombok/javac/LombokOptions', 'lombok/javac/CommentCatcher', 'com/sun/tools/javac/main/JavaCompiler', 'java/util/List', 'java/util/Map', 'com/sun/tools/javac/main/JavaCompiler' } [ERROR] stack: { 'com/sun/tools/javac/main/JavaCompiler', 'com/sun/tools/javac/main/JavaCompiler', 'com/sun/tools/javac/comp/Todo' }