From 5e3c4e44157164e8d5633063f7d7aa4be1a4ca4b Mon Sep 17 00:00:00 2001 From: David Craine Date: Fri, 26 Jul 2002 21:07:55 +0000 Subject: [PATCH] git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@532 51baf565-9d33-0410-a72c-fc3788e3496d --- .../pmd/rules/UnusedFormalParameterRule.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) 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