From 9b3fcc26081e2b0ba73de7622e600a79e94427fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Sat, 12 May 2018 01:37:59 -0300 Subject: [PATCH] [java] Simplify LongInstantiation and IntegerInstantiation - Narrow down both rule's search space (therefore making better usage of the rulechain and reducing number of checks performed) - Use type resolution to simplify the rules and avoid FPs when declaring classes with the same names --- .../src/main/resources/category/java/performance.xml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pmd-java/src/main/resources/category/java/performance.xml b/pmd-java/src/main/resources/category/java/performance.xml index c41783557a..31f2ee3664 100644 --- a/pmd-java/src/main/resources/category/java/performance.xml +++ b/pmd-java/src/main/resources/category/java/performance.xml @@ -447,11 +447,9 @@ Note that new Integer() is deprecated since JDK 9 for that reason. @@ -481,11 +479,9 @@ Note that new Long() is deprecated since JDK 9 for that reason.