From 47a29fdb176befd9430b576b1c9eb2c248960b5b Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Wed, 22 Nov 2017 21:31:13 +0100 Subject: [PATCH] Add break and adjust logging --- pmd-core/src/main/java/net/sourceforge/pmd/RuleSet.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/RuleSet.java b/pmd-core/src/main/java/net/sourceforge/pmd/RuleSet.java index ae19473348..bf3572e437 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/RuleSet.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/RuleSet.java @@ -135,7 +135,9 @@ public class RuleSet implements ChecksumAware { // be problematic - see #RuleSet.getRuleByName(String) for (Rule rule : rules) { if (rule.getName().equals(newRule.getName()) && rule.getLanguage() == newRule.getLanguage()) { - LOG.warning("Duplicated rule: " + newRule.getName()); + LOG.warning("The rule with name " + newRule.getName() + " is duplicated. " + + "Future versions of PMD will reject to load such rulesets."); + break; } }