lombok java8,Lombok与Java 8有关

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值