This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit

Dead Code: Broken Override

Revision as of 18:29, 27 May 2009 by MediaWiki spam cleanup (talk | contribs) (Reverting to last version not containing links to

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


#REDIRECT Failure to follow guideline/specification

Last revision (mm/dd/yy): 05/27/2009


This method fails to override a similar method in its superclass because their parameter lists do not match.

This method declaration looks like an attempt to override a method in a superclass, but the parameter lists do not match, so the superclass method is not overridden.

Risk Factors



The class DeepFoundation is meant to override the method getArea() in its parent class, but the parameter lists are out of sync.

	public class Foundation
	  public int getArea() {
	class DeepFoundation extends Foundation
	  public int getArea(int a) {

Related Attacks

Related Vulnerabilities

Related Controls

Related Technical Impacts