One more tweak

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4765 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2006-10-31 02:33:54 +00:00
parent f42be14252
commit e912255b43

View File

@ -44,22 +44,18 @@ public class ExceptionSignatureDeclaration extends AbstractRule {
}
List exceptionList = methodDeclaration.findChildrenOfType(ASTName.class);
if (exceptionList.isEmpty()) {
return super.visit(methodDeclaration, o);
if (!exceptionList.isEmpty()) {
evaluateExceptions(exceptionList, o);
}
evaluateExceptions(exceptionList, o);
return super.visit(methodDeclaration, o);
}
public Object visit(ASTConstructorDeclaration constructorDeclaration, Object o) {
List exceptionList = constructorDeclaration.findChildrenOfType(ASTName.class);
if (exceptionList.isEmpty()) {
return super.visit(constructorDeclaration, o);
if (!exceptionList.isEmpty()) {
evaluateExceptions(exceptionList, o);
}
evaluateExceptions(exceptionList, o);
return super.visit(constructorDeclaration, o);
}