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:
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
4
pmd/test-data/LooseCoupling9.java
Normal file
4
pmd/test-data/LooseCoupling9.java
Normal file
@ -0,0 +1,4 @@
|
||||
import java.util.*;
|
||||
public class LooseCoupling9 {
|
||||
public void foo(Vector bar) {}
|
||||
}
|
Reference in New Issue
Block a user