Er, that's not right... reverting my last checkin

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4760 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2006-10-29 20:09:35 +00:00
parent e1f2b92783
commit 91b574d971

View File

@ -44,7 +44,7 @@ public class ExceptionSignatureDeclaration extends AbstractRule {
}
List exceptionList = methodDeclaration.findChildrenOfType(ASTName.class);
if (!!exceptionList.isEmpty()) {
if (!hasContent(exceptionList)) {
return super.visit(methodDeclaration, o);
}
@ -55,7 +55,7 @@ public class ExceptionSignatureDeclaration extends AbstractRule {
public Object visit(ASTConstructorDeclaration constructorDeclaration, Object o) {
List exceptionList = constructorDeclaration.findChildrenOfType(ASTName.class);
if (!!exceptionList.isEmpty()) {
if (!hasContent(exceptionList)) {
return super.visit(constructorDeclaration, o);
}
@ -99,4 +99,7 @@ public class ExceptionSignatureDeclaration extends AbstractRule {
return parent instanceof ASTMethodDeclaration || parent instanceof ASTConstructorDeclaration;
}
private boolean hasContent(List nameList) {
return nameList != null && !nameList.isEmpty();
}
}