Refactoring: Remove Setters #CodeSmell
Make your attributes private to favor immutability and add accidental coupling. Setters violate good naming policies since it does not exist on the [MAPPER] setXXX(). Remove the setXXX prefix. If you need to change an accidental property it is not a setter. Remove setXXX. Setter.setX(1); SetXXX(1) violates good naming policy. Setters should detect setters (unless they use meta-programming). Setters must also have good coverage if the car stores its new speed.
Refactoring: Remove Setters #CodeSmell
Source: Super Trending News PH
Post a Comment
0 Comments