forked from phoedos/pmd
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:
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user