removed unused local

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@555 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2002-07-30 19:41:26 +00:00
parent 13e7d11dd2
commit 640d8dc729

View File

@ -28,13 +28,12 @@ public class UnusedFormalParameterRule extends AbstractRule {
*/
private void checkParamNames(HashSet paramNames, SimpleNode startNode) {
if (paramNames.isEmpty()) return; //if there are no more paramNames then there's no reason to keep checking
int index = 0;
if (startNode instanceof ASTName) {
String nodeImage = ((ASTName)startNode).getImage();
//check to see if there is a "." in the image which indicates a method call on this variable name
int index2 = nodeImage.indexOf('.');
if (index2 != -1) {
nodeImage = nodeImage.substring(0, index2); //set the node Image to the prefix
int index = nodeImage.indexOf('.');
if (index != -1) {
nodeImage = nodeImage.substring(0, index); //set the node Image to the prefix
}
if (paramNames.contains(nodeImage)) {
paramNames.remove(nodeImage); //the name is used so let's remove it from the list