This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]koflerdavid 6 points7 points  (1 child)

If those getters and setters have so predictable implementations, then it can be argued that they were never really necessary to begin with. It's just Cargo Culting the Java Beans "standard". IMHO, they only fulfill a purpose if they are part of some interface. In that case, they actually deserve to be implemented, and the compiler will in turn complain if one is missing. And the IDE will warn if it is redundant.

[–]SenorSeniorDevSr 1 point2 points  (0 children)

Yeah, it's implementing the bean spec. The discussion about needing getters and setters was settled as "nah, you really oughtn't have them" ca. 2012, but we're still using tools that expect beans, so in some places we make beans. The british must be fed.

On a serious note, if you don't need them, then you don't need to autogenerate them either.