Code Smells

Code Smells / Couplers / Feature Envy

Feature Envy code smell icon

Feature Envy

Feature Envy occurs when a method is overly reliant on another class.

This is an indication that the feature of the other class could be defined in a better location, such as in the envious method’s class, a super class of both classes, or another unrelated class.

Feature Envy is a method overly reliant on a class. For a class overly reliant on another class, check out Inappropriate Intimacy.

Left chevron Right chevron