I just upgrade to Intellij idea 14 and Java 8 and I had on mind to upgrade my project to Java version 8 as well, to start using some new features. But After configure the Intellij properly to use Java 8 I have still the issue with Lombok. Looks like there´s a conflict between Java 8 and lombok because now my @Getter
and @Setter
annotations do not work anymore.
The version of lombok is 1.10.8. Any suggestions?
Short answer:
Lombok supports Java 8, and has done so since version 1.12.2.
Long answer
Lombok supports Java 8, and has done so since version 1.12.2 (October 10th, 2013) according to the changelog:
PLATFORM: Initial JDK8 support, without affecting existing support for JDK6 and 7. Issue #451. While lombok will now work on JDK8 / javac8, and netbeans 7.4 and up, lombok does not (yet) support new language features introduced with java8, such as lambda expressions. Support for these features will be added in a future version.
Since then further Java 8 support has been implemented:
v1.12.6 (March 6th, 2014)
PLATFORM: Initial JDK8 support for eclipse's alpha support in kepler. Issue #597
v1.14.0 "Branching Cobra" (May 27th, 2014)
BUGFIX: Usage of @SneakyThrows with a javac from JDK8 with -target 1.8 would result in a post compiler error. Issue #655
BUGFIX: Major work on improving support for JDK8, both for javac and eclipse.
v1.14.6 (September 2nd, 2014)
BUGFIX: Usage of val would break starting with JDK8 release 1.8.0_20. Issue #731
In other words, the newest version of Lombok should be able to work with Java 8 fairly well, and since version 1.12.2, Java 8 code without the new language features should work.
EDIT: As Roel pointed out, there is currently (8th january 2015) an open bug specifying that one specific Lombok feature (val
) stopped working for 1.14.8.
This bug was closed 16th November 2015.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With