This commit is contained in:
Clément Fournier
2023-05-03 14:03:42 +02:00
parent 7e37e4b82e
commit 8580745430
2 changed files with 14 additions and 1 deletions

View File

@ -1281,7 +1281,7 @@ Consider replacing Hashtable usage with the newer java.util.Map if thread safety
<properties>
<property name="xpath">
<value><![CDATA[
//ClassOrInterfaceType[pmd-java:typeIs('java.util.Hashtable')]
//ClassOrInterfaceType[pmd-java:typeIsExactly('java.util.Hashtable')]
]]></value>
</property>
</properties>

View File

@ -39,4 +39,17 @@ public class Foo {
}
]]></code>
</test-code>
<test-code>
<description>Properties #4433</description>
<expected-problems>0</expected-problems>
<code><![CDATA[
import java.util.Properties;
public class Foo {
Properties field;
void bar(Properties h) {
Properties local;
}
}
]]></code>
</test-code>
</test-data>