Synopsis: | The Clone Implementation ruleset contains a collection of rules that find questionable usages of the clone() method. |
Description: |
The Clone Implementation ruleset contains a collection of rules that find questionable usages of the clone() method. |
Name | Checked | Synopsis |
---|---|---|
CloneImplementation1 | ![]() |
Object clone() should be implemented with super.clone() |
CloneImplementation2 | ![]() |
clone() method should throw CloneNotSupportedException |
CloneImplementation3 | ![]() |
clone() method should be implemented only if implementing Cloneable interface |
CloneImplementation4 | ![]() |
Clone method should be public |
CloneImplementation5 | ![]() |
Clone method return type should match class name |