Skip to content

Commit

Permalink
misc: add missing test case to SuperCloneCheckTest
Browse files Browse the repository at this point in the history
  • Loading branch information
pbludov committed Jan 18, 2020
1 parent 95defdd commit b6f7e07
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Expand Up @@ -62,6 +62,7 @@ public void testAnotherInputFile() throws Exception {
final DefaultConfiguration checkConfig =
createModuleConfig(SuperCloneCheck.class);
final String[] expected = {
"43:17: " + getCheckMessage(MSG_KEY, "clone", "super.clone"),
"9:17: " + getCheckMessage(MSG_KEY, "clone", "super.clone"),
};
verify(checkConfig, getPath("InputSuperClonePlainAndSubclasses.java"), expected);
Expand Down
Expand Up @@ -6,7 +6,7 @@ interface InputSuperClonePlainAndSubclasses {
}

class A {
public Object clone() {
public Object clone() { // violation
return null;
}
}
Expand Down Expand Up @@ -37,3 +37,12 @@ public void run() {
};
}
}

class D extends B {

public Object clone() throws CloneNotSupportedException { // violation
super.clone(null, null);
return null;
}

}

0 comments on commit b6f7e07

Please sign in to comment.