Affects PMD Version:
6.2.0
Rule:
category/java/errorprone.xml/CloneMethodMustImplementCloneable
Description:
The code below did not trigger this rule before PMD 6.2.0.
The clone() method is defined in the interface so the return value is of type Foo instead of Object.
Code Sample demonstrating the issue:
public interface Foo
extends Serializable, Cloneable {
Foo clone() throws CloneNotSupportedException;
}
Running PMD through: Gradle
Affects PMD Version:
6.2.0
Rule:
category/java/errorprone.xml/CloneMethodMustImplementCloneable
Description:
The code below did not trigger this rule before PMD 6.2.0.
The
clone()method is defined in the interface so the return value is of typeFooinstead ofObject.Code Sample demonstrating the issue:
Running PMD through: Gradle