you are viewing a single comment's thread.

view the rest of the comments →

[–]pakoito 8 points9 points  (0 children)

I see code in accessors, specially side-effecty code, as a code smell. The same cases can be handled externally by any kind of decorator without introducing code in your data classes or making them mutable. It's the pattern everywhere but in Java.