Alternative classes with different interfaces smell

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
m (category)
m (See also)
Line 3: Line 3:
 
== See also ==
 
== See also ==
 
* [[Code smells]]
 
* [[Code smells]]
 +
 +
{{Template:CodeSmells}}
  
 
[[Category:Code smells]]
 
[[Category:Code smells]]

Revision as of 09:30, 14 October 2009

This smell occurs when two methods in different classes do the same thing but have a different method signature. You should try to rename the methods that do the same thing in a consistent way. However, often there is a deeper problem where two classes are doing something very similar. You could try to move methods around or extract the common behavior into a common superclass.

See also


Personal tools