diff --git a/pmd/etc/changelog.txt b/pmd/etc/changelog.txt index 4ea468d738..0085a2f8bf 100644 --- a/pmd/etc/changelog.txt +++ b/pmd/etc/changelog.txt @@ -1,6 +1,7 @@ ???? - 4.2.1: '41' and '42' shortcuts for rulesets added +Fixed bug 1928009 - Error using migration ruleset in PMD 4.2 March 25, 2008 - 4.2: diff --git a/pmd/rulesets/internal/dogfood.xml b/pmd/rulesets/internal/dogfood.xml index 3c3305d518..448cb5c4bf 100644 --- a/pmd/rulesets/internal/dogfood.xml +++ b/pmd/rulesets/internal/dogfood.xml @@ -72,6 +72,10 @@ Rules to check PMD itself - + + + + + diff --git a/pmd/src/net/sourceforge/pmd/AbstractRuleChainVisitor.java b/pmd/src/net/sourceforge/pmd/AbstractRuleChainVisitor.java index 6de835a91e..2adcc1e77a 100644 --- a/pmd/src/net/sourceforge/pmd/AbstractRuleChainVisitor.java +++ b/pmd/src/net/sourceforge/pmd/AbstractRuleChainVisitor.java @@ -57,10 +57,10 @@ public abstract class AbstractRuleChainVisitor implements RuleChainVisitor { for (int j = 0; j < nodeNames.size(); j++) { List nodes = nodeNameToNodes.get(nodeNames.get(j)); for (SimpleNode node: nodes) { - // Visit with underlying Rule, not the RuleReference - if (rule instanceof RuleReference) { - rule = ((RuleReference)rule).getRule(); - } + // Visit with underlying Rule, not the RuleReference + while (rule instanceof RuleReference) { + rule = ((RuleReference)rule).getRule(); + } visit(rule, node, ctx); } visits += nodes.size();