From 1d7d5e64743d7e3a5640ea632e0163a6518c2c6a Mon Sep 17 00:00:00 2001 From: Romain Pelisse Date: Sat, 14 Nov 2009 15:00:48 +0000 Subject: [PATCH] Adding a new rule 'UseConcurrentHashMap' to promote use of ConcurrentHashMap implementation in Java 5 git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x@6997 51baf565-9d33-0410-a72c-fc3788e3496d --- .../xml/UseConcurrentHashMap.xml | 22 ++++++++++++++ pmd/rulesets/controversial.xml | 30 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 pmd/regress/test/net/sourceforge/pmd/rules/controversial/xml/UseConcurrentHashMap.xml diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/controversial/xml/UseConcurrentHashMap.xml b/pmd/regress/test/net/sourceforge/pmd/rules/controversial/xml/UseConcurrentHashMap.xml new file mode 100644 index 0000000000..d25d98509e --- /dev/null +++ b/pmd/regress/test/net/sourceforge/pmd/rules/controversial/xml/UseConcurrentHashMap.xml @@ -0,0 +1,22 @@ + + + + + 2 + + + diff --git a/pmd/rulesets/controversial.xml b/pmd/rulesets/controversial.xml index e00673ab0d..d6623121ed 100644 --- a/pmd/rulesets/controversial.xml +++ b/pmd/rulesets/controversial.xml @@ -712,6 +712,36 @@ public class PrimitiveType { + + +Since Java5 brought a new implementation of the Map interface, specially designed for concurrent application. + + 3 + + + + + + + + + + + + +