Update UnusedPrivateMethodRule.java

Add break
This commit is contained in:
shilko2013
2020-03-11 20:52:22 +03:00
committed by GitHub
parent 4749833534
commit edbc060aa1

View File

@ -105,6 +105,7 @@ public class UnusedPrivateMethodRule extends AbstractIgnoredAnnotationRule {
ASTMethodDeclaration enclosingMethod = occNode.getFirstParentOfType(ASTMethodDeclaration.class);
if (enclosingMethod == null || !mnd.getNode().getParent().equals(enclosingMethod)) {
callsFromOutsideMethod++;
break;
}
}
return callsFromOutsideMethod == 0;