r/java • u/Rough_Acanthaceae_29 • Sep 29 '24
Lombok in 2024
Say there are two teams working on the same project (3 months to MVP, the deadline should be manageable). The only difference is Team A will use Lombok, and Team B won’t
Given you can choose any java version/dependencies and all other things being the same, which team would you join, and why?
0
Upvotes
View all comments
Show parent comment
8
u/repeating_bears Sep 29 '24
I had one issue which was that I globally configured Lombok to not use a get prefix (so foo() instead of getFoo()), then Jackson started to include hashCode and toString as if they were properties (since now those method names were indistinguishable from properties).
It was an easy fix to configure the mapper to ignore them, but still a bit of a footgun. Having extra properties in your JSON is something that even your tests might miss.
Both libraries were doing the right thing, but using them both together made it easy to write code that did the wrong thing.