That's more like it

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4764 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2006-10-31 01:38:04 +00:00
parent a6b80bb594
commit f42be14252

View File

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