| Severity | 1 |
|---|---|
| Enabled | yes |
| Waivable | |
| Violation |
public Object clone() {
ConstructorsInCloneRuleViolationTestCase other =New ConstructorsInCloneRuleViolationTestCase();
other.name = name;
return other;
}
|
| Fix |
public Object clone() {
ConstructorsInCloneRuleFixTestCase other = null;
try {
other = (ConstructorsInCloneRuleFixTestCase) super.clone();
other.name = name;
} catch (CloneNotSupportedException e) {
logger.error(CLONE_ERROR_TXT, e);
}
return other;
}
|