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

Code Correctness: Class Does Not Implement Cloneable

From OWASP
Revision as of 18:27, 27 May 2009 by MediaWiki spam cleanup (talk | contribs) (Reverting to last version not containing links to www.texttrdellialc.com)

Jump to: navigation, search

Template:CandidateForDeletion

#REDIRECT Failure to follow guideline/specification

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


Description

This class implements a clone() method but does not implement Cloneable.

It appears that the programmer intended for this class to implement the Cloneable interface because it implements a method named clone(). However, the class does not implement the Cloneable interface and the clone() method will not behave correctly.


Risk Factors

TBD

Examples

Calling clone() for this class will result in a CloneNotSupportedException.

	public class Kibitzer {
	  public Object clone() throws CloneNotSupportedException {
		... 
	  }
	}

Related Attacks


Related Vulnerabilities


Related Controls


Related Technical Impacts


References

TBD