CloneMethodMustImplementClonable and inherited cloneable
A source code analyzer
Brought to you by:
adangel,
juansotuyo
Assume the following code
public class MyDateFormat extends SimpleDateFormat {
@Override
public final Object clone() {
final Object clone = super.clone();
// special clone handling
return clone;
}
}
By extending SimpleDateFormat, the Clonable interface is in the "implements" List.
Nevertheless PMD gives me the warning CloneMethodMustImplementCloneable. It seems that only the implements List of the class itself is checked.