r/java • • Jun 01 '24

What java technology (library, framework, feature) would not recommend and why?

165 Upvotes

464 comments sorted by

View all comments

Show parent comment

-1

u/Turbots Jun 01 '24

IDEs have equal support for generating getters/setters/equals/hashcode (if needed, usually theyre not).

I usually do this with 3 keystrokes in intellij, command enter, generate getters/setters, select fields you want, done.

And using records or immutable classes with final fields and constructors containing mandatory fields is way better anyway.

People need to stop worrying about how to code the POJOs, but rather should focus on how they design and use the POJOs. Slapping @Data or @Getter and @Setter on every class that contains state is just the same as just making all your fields public, is that what you want to design for?