updated loose coupling rule to check for Vector; thx to Vladimir for catching that

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1263 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2002-11-25 14:20:26 +00:00
parent e6c434e567
commit 8d2b3d85fc
3 changed files with 10 additions and 0 deletions

View File

@ -44,4 +44,8 @@ public class LooseCouplingRuleTest extends RuleTst {
public void test8() throws Throwable {
runTest("LooseCoupling8.java", 1, rule);
}
public void testVector() throws Throwable {
runTest("LooseCoupling9.java", 1, rule);
}
}

View File

@ -27,6 +27,7 @@ public class LooseCouplingRule extends AbstractRule {
implClassNames.add("LinkedHashSet");
implClassNames.add("TreeSet");
implClassNames.add("TreeMap");
implClassNames.add("Vector");
implClassNames.add("java.util.HashSet");
implClassNames.add("java.util.HashMap");
implClassNames.add("java.util.ArrayList");
@ -35,6 +36,7 @@ public class LooseCouplingRule extends AbstractRule {
implClassNames.add("java.util.LinkedHashSet");
implClassNames.add("java.util.TreeSet");
implClassNames.add("java.util.TreeMap");
implClassNames.add("java.util.Vector");
}
public Object visit(ASTName node, Object data) {

View File

@ -0,0 +1,4 @@
import java.util.*;
public class LooseCoupling9 {
public void foo(Vector bar) {}
}