SingularField violations fixed

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5558 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Wouter Zelle
2007-10-19 08:03:45 +00:00
parent d23b3b3260
commit f0600f7922
2 changed files with 3 additions and 8 deletions

View File

@ -23,7 +23,6 @@ public class TooManyFields extends AbstractRule {
private Map<String, Integer> stats;
private Map<String, ASTClassOrInterfaceDeclaration> nodes;
private int maxFields;
private static final PropertyDescriptor maxFieldsDescriptor = new IntegerProperty(
"maxfields",
@ -36,7 +35,7 @@ public class TooManyFields extends AbstractRule {
public Object visit(ASTCompilationUnit node, Object data) {
maxFields = getIntProperty(maxFieldsDescriptor);
int maxFields = getIntProperty(maxFieldsDescriptor);
stats = new HashMap<String, Integer>(5);
nodes = new HashMap<String, ASTClassOrInterfaceDeclaration>(5);

View File

@ -35,13 +35,9 @@ public abstract class AbstractJUnitRule extends AbstractRule {
}
}
private boolean isJunit4Class = false;
private boolean isJunit3Class = false;
public Object visit(ASTCompilationUnit node, Object data){
isJunit3Class = isJUnit3Class(node);
isJunit4Class = isJUnit4Class(node);
boolean isJunit3Class = isJUnit3Class(node);
boolean isJunit4Class = isJUnit4Class(node);
if(isJunit3Class || isJunit4Class){
return super.visit(node, data);
}