Posts

Showing posts from June, 2019

How Lombok can throw you off guard - Java Compiler fun

Image
Working on a project on a customer of mine, I bumped into some very weird Lombok behavior which really caught me off guard. As it was caused by a not-so-easy to debug issue, I'd like to share with you all what happened and why. Enter WTF After making some changes to the Maven POM structure, and doing a compile of the code, maven reported the following errors: [ERROR] SomeFile.java[20,43] cannot find symbol [ERROR]    symbol: class __ [ERROR] SomeFile.java[17,32] cannot find symbol [ERROR]    symbol: class __ [ERROR] SomeFile.java[21,33] cannot find symbol [ERROR]    symbol: class __ [ERROR] SomeFile.java[78l,13] cannot find symbol [ERROR]    symbol: method getValue() [ERROR]    location: .... Of course, I knew  we're using Lombok to generate Getter, setters etc for our classes, so for some reason Lombok was not being run, causing the @__ annotation still being present, and the getValue() method not being generated during compilation. What was even mor