Java 8 Compilation problems

1,821 views
Skip to first unread message

Steven Dick

unread,
Jun 17, 2015, 9:22:37 AM6/17/15
to project...@googlegroups.com
I'm trying to upgrade a Java 6-based multi-project build to Java 8 and not having much luck with Lombok.

Everything is fine in Eclipse Luna, but the 2nd project fails in the Gradle build with:

symbol:   class __
  location: class IVValMTDTransaction
C:\Users\sdick\git\hedgesphere-mt\HSMtApi\src\main\java\ch\hedgesphere\transaction\domain\InvestingPosUIVTrx.java:162: error: cannot find symbol
    @Getter(onMethod=@__({@XmlElement(name = "uInvestable")}))

C:\Users\sdick\git\hedgesphere-mt\HSMtApi\src\main\java\ch\hedgesphere\transaction\domain\InvestingPosUIVTrx.java:162: error: duplicate element '<any?>' in annotation @<any?>.
    @Getter(onMethod=@__({@XmlElement(name = "uInvestable")}))

Setting source compatibility to 1.7 is fine; setting 1.8 causes the compilation errors. I've tried Lombok versions 1.16.2 and 1.16.4 with no difference.

I've commented on issue https://code.google.com/p/projectlombok/issues/detail?id=743 as that seems related.

Besides that,  I'm also getting a 'does not override abstract method' compilation error from the following hierarchy of types: 

interface <-- defines a getter method
  ^
  |
abstract class implements interface and uses @Getter
  ^
  |
concrete class inherits from abstract class <-- this class gets the 'does not override abstract method' error even though it should inherit it from the abstract parent

It seems to me that the errors would be consistent with Lombok NOT generating any code, but I don't know how to debug this problem further.

I've tried to extract the same patterns into a test project, but so far the simplified code does not generate the same problems. :-(

Steven Dick

unread,
Jun 18, 2015, 3:23:31 AM6/18/15
to project...@googlegroups.com
I replaced all the @Getter annotations using the onMethod argument with hand-written code and both sets of problems went away. So that's the solution for me.

Jocelyn

unread,
Jul 28, 2015, 1:49:59 PM7/28/15
to Project Lombok, steven.d...@gmail.com
btw, if you stumble upon this like me, the new URL of the issue is: https://github.com/rzwitserloot/lombok/issues/778
Reply all
Reply to author
Forward
0 new messages