TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - Java Coding Standard
Search

Rule:  CloneImplementation1Checked automatically with code checker

This rule is Obsolete
Synopsis:Object clone() should be implemented with super.clone()
Language:Java
Severity Level:2
Category:CloneImplementation


Description:
Object clone() should be implemented with super.clone().
class Foo{
    public Object clone(){
        return new Foo(); // This is bad
    }
}