forked from phoedos/pmd
replaced common Integer creation with numeric constants
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4528 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -6,6 +6,7 @@ package net.sourceforge.pmd.rules;
|
||||
import net.sourceforge.pmd.ast.ASTCompilationUnit;
|
||||
import net.sourceforge.pmd.ast.ASTImportDeclaration;
|
||||
import net.sourceforge.pmd.rules.design.ExcessiveNodeCountRule;
|
||||
import net.sourceforge.pmd.util.NumericConstants;
|
||||
|
||||
/**
|
||||
* ExcessiveImports attempts to count all unique imports a class
|
||||
@ -30,6 +31,6 @@ public class ExcessiveImports extends ExcessiveNodeCountRule {
|
||||
* @return Object
|
||||
*/
|
||||
public Object visit(ASTImportDeclaration node, Object data) {
|
||||
return new Integer(1);
|
||||
return NumericConstants.ONE;
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ package net.sourceforge.pmd.rules.design;
|
||||
|
||||
import net.sourceforge.pmd.ast.ASTFormalParameter;
|
||||
import net.sourceforge.pmd.ast.ASTFormalParameters;
|
||||
import net.sourceforge.pmd.util.NumericConstants;
|
||||
|
||||
/**
|
||||
* This rule detects an abnormally long parameter list.
|
||||
@ -19,6 +20,6 @@ public class LongParameterListRule extends ExcessiveNodeCountRule {
|
||||
|
||||
// Count these nodes, but no others.
|
||||
public Object visit(ASTFormalParameter node, Object data) {
|
||||
return new Integer(1);
|
||||
return NumericConstants.ONE;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user