ConstructiCat Logo
CodeBust.
Browse section ▾

Feature Envy.

A method accesses the data of another object more than its own data.

##Signs and Symptoms

A method accesses the data of another object more than its own data.

##Reasons for the Problem

This smell may occur after fields are moved to a data class. If this is the case, you may want to move the operations on data to this class as well.

##Payoff

  • Less code duplication (if the data handling code is put in a central place).

  • Better code organization (methods for handling data are next to the actual data).