Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor: add missing test case to SuperCloneCheckTest #7494

Merged
merged 1 commit into from Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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;
}

}