Remove more utils
This commit is contained in:
@ -27,7 +27,6 @@ import net.sourceforge.pmd.lang.plsql.ast.ASTWhileStatement;
|
||||
import net.sourceforge.pmd.lang.plsql.ast.ExecutableCode;
|
||||
import net.sourceforge.pmd.lang.plsql.ast.PLSQLNode;
|
||||
import net.sourceforge.pmd.lang.plsql.ast.PLSQLParserVisitorAdapter;
|
||||
import net.sourceforge.pmd.util.NumericConstants;
|
||||
|
||||
/**
|
||||
* @author Clément Fournier
|
||||
@ -220,7 +219,7 @@ class NPathComplexityVisitor extends PLSQLParserVisitorAdapter {
|
||||
ASTExpression expr = node.getFirstChildOfType(ASTExpression.class);
|
||||
|
||||
if (expr == null) {
|
||||
return NumericConstants.ONE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int boolCompReturn = NPathComplexityRule.sumExpressionComplexity(expr);
|
||||
@ -233,7 +232,7 @@ class NPathComplexityVisitor extends PLSQLParserVisitorAdapter {
|
||||
if (boolCompReturn > 0) {
|
||||
return boolCompReturn;
|
||||
}
|
||||
return NumericConstants.ONE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -278,7 +277,7 @@ class NPathComplexityVisitor extends PLSQLParserVisitorAdapter {
|
||||
|
||||
@Override
|
||||
public Object visit(ASTConditionalOrExpression node, Object data) {
|
||||
return NumericConstants.ONE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ import net.sourceforge.pmd.lang.plsql.ast.PLSQLNode;
|
||||
import net.sourceforge.pmd.lang.plsql.rule.AbstractPLSQLRule;
|
||||
import net.sourceforge.pmd.properties.PropertyDescriptor;
|
||||
import net.sourceforge.pmd.properties.PropertyFactory;
|
||||
import net.sourceforge.pmd.util.NumericConstants;
|
||||
|
||||
public class TooManyFieldsRule extends AbstractPLSQLRule {
|
||||
|
||||
@ -91,7 +90,7 @@ public class TooManyFieldsRule extends AbstractPLSQLRule {
|
||||
private void bumpCounterFor(PLSQLNode clazz) {
|
||||
String key = clazz.getImage();
|
||||
if (!stats.containsKey(key)) {
|
||||
stats.put(key, NumericConstants.ZERO);
|
||||
stats.put(key, 0);
|
||||
nodes.put(key, clazz);
|
||||
}
|
||||
Integer i = stats.get(key) + 1;
|
||||
|
Reference in New Issue
Block a user