Skip to content

Comment on Lombok Saved My Assparent

Comments

If you use @Data you say that all fields will be available with getters and setters that will have no other special logic.

Why not consider making those fields public then and not bother with @Data?.

This is how Java language was designed, then everybody started mindlessly putting getters and setters around private fields to pretend they are private while giving everybody access to do whatever they want with them (silly).

Now you are putting @Data to further muddle the problem which basically does not exist.

hash, equals, toString.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.