Add break and adjust logging

This commit is contained in:
Andreas Dangel
2017-11-22 21:31:13 +01:00
parent 16c3c161bc
commit 47a29fdb17

View File

@ -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;
}
}