diff --git a/pmd/src/net/sourceforge/pmd/rules/UnusedFormalParameterRule.java b/pmd/src/net/sourceforge/pmd/rules/UnusedFormalParameterRule.java index 06e33f9c34..c2d85d15dc 100644 --- a/pmd/src/net/sourceforge/pmd/rules/UnusedFormalParameterRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/UnusedFormalParameterRule.java @@ -10,7 +10,6 @@ import net.sourceforge.pmd.ast.ASTBlock; public class UnusedFormalParameterRule extends AbstractRule { - private List paramNames = null; /** Skip interfaces @@ -19,27 +18,28 @@ public class UnusedFormalParameterRule extends AbstractRule { return data; } + /** + * Check to see if the param names are used in the body of the method + * @param paramNames list of param names to check + */ + private void checkParamNames(HashSet paramNames, SimpleNode startNode) { + + } + public Object visit(ASTMethodDeclaration node, Object data) { if (node.isPrivate()) { SimpleNode md = (SimpleNode)node.jjtGetChild(1); SimpleNode formalParams = (SimpleNode)md.jjtGetChild(0); int paramCount = formalParams.jjtGetNumChildren(); if (paramCount == 0) return data; //bail out if now paramters - paramNames = new ArrayList(); + HashSet paramNames = new HashSet(); for (int i=0; i