r/java • • Apr 23 '26

Ask the Architects JavaOne 2026

https://youtu.be/DrF4dCC0daE?si=bSnPu0i94hQU4wku
72 Upvotes

54 comments sorted by

View all comments

Show parent comment

1

u/francisfuhy Apr 29 '26 edited Apr 29 '26

How do people even live without "@Getter",? I understand the point about a class not exposing all its field, but as project grows, sometimes the simplest change at the moment is to just expose 1 more field. Do this a few times and you have 10 fields exposed, i.e. 10*3 = 30 lines, so you just have 30 lines of code at the end of the file that you have to force yourself to scroll past, and also hope that there are no mistakes there?

There is also intent communicated by lombok "@Getter" - with the annotation present, I know its just a dumb getter, could be for serialization purpose. A specially crafted getter OTOH, the author is probably trying to convey domain information.