Mohammed Salman Shaikh
2 min readFeb 16, 2019

--

It’s been 2 years in development and I am finding lombok to be more annoying than reducing time. Initially when I found out about lombok, I was excited to use it when I got the chance. Hence, while creating a project from scratch, I tried using it. Firstly, I couldn’t get it to work right off because of the annoying procedure to run the jar and point it to eclipse installation folder. When I finally got it to working, I suggested other colleagues to try it out as well. My project partner faced the same issue as mine and couldn’t get it to working. After some vodoo magic (don’t remember how) it did work on her machine. So that’s the first thing annoying.

Later, I came to know about another amazing library — Mapstruct!

And it is truly a time saver in development and also in performance unlike Dozer or similar libraries which use reflection!

I tried using it in the same project which included lombok. Boy o boy I spent days trying to make both Mapstruct and Lombok work together but I couldn’t! I had to remove lombok and create the getter,setter,… (didn’t have time to look in detail about delombofication phew!) and used Mapstruct. I have read that Lombok 1.18+ versions have this issue fixed but haven’t had time to try it.

I did use Lombok in later projects until today! I faced a limitiation issue of Spring AOP not intercepting static and interclass method calls and decided to start learning AspectJ based AOP. Started a clean spring boot project with lombok and AspectJ and now I found a new warning in STS saying lombok is disabled since AspectJ compiler is being used. Googled alternatvies of lombok and found this article. I’m now thinking of deserting lombok due to daily new problems. My priority is AOP now and I’m better off using shortcuts to generate the basic getter, setters and blah blah one time then facing this kind of problems. Maybe I will try out some alternatives like Autovalue but not use them in actual projects unless they don’t cause more annoying problems.

--

--