diff --git a/pmd/etc/changelog.txt b/pmd/etc/changelog.txt index e01b36400f..b982660a12 100644 --- a/pmd/etc/changelog.txt +++ b/pmd/etc/changelog.txt @@ -20,6 +20,10 @@ Fixed bug 1048: CommentContent Rule, String Index out of range Exception Fixed bug 1055: Please add a colon in the ant output after line,column for Oracle JDeveloper IDE usage Fixed bug 1060: GodClassRule >>> wrong method +????? ??, 2013 - 5.0.2: + +Fixed bug 1049: Errors in “How to write a rule” + November 28, 2012 - 5.0.1: Fixed bug 820: False+ AvoidReassigningParameters diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/java/rule/design/GenericClassCounterRule.java b/pmd/src/main/java/net/sourceforge/pmd/lang/java/rule/design/GenericClassCounterRule.java index 19f8bda7aa..ca71641bdc 100644 --- a/pmd/src/main/java/net/sourceforge/pmd/lang/java/rule/design/GenericClassCounterRule.java +++ b/pmd/src/main/java/net/sourceforge/pmd/lang/java/rule/design/GenericClassCounterRule.java @@ -73,7 +73,7 @@ public class GenericClassCounterRule extends AbstractJavaRule { private int threshold; private static String counterLabel; - + public GenericClassCounterRule() { definePropertyDescriptor(NAME_MATCH_DESCRIPTOR); definePropertyDescriptor(OPERAND_DESCRIPTOR); @@ -178,7 +178,7 @@ public class GenericClassCounterRule extends AbstractJavaRule { } // Cleaning the context for the others rules ctx.removeAttribute(counterLabel); - super.start(ctx); + super.end(ctx); } } } diff --git a/pmd/src/site/xdocs/howtowritearule.xml b/pmd/src/site/xdocs/howtowritearule.xml index 5418c63fc8..36f1d63710 100644 --- a/pmd/src/site/xdocs/howtowritearule.xml +++ b/pmd/src/site/xdocs/howtowritearule.xml @@ -317,7 +317,7 @@ public class CountRule extends AbstractJavaRule { AtomicLong total = (AtomicLong)ctx.getAttribute(COUNT); addViolation(ctx, null, new Object[] { total }); ctx.removeAttribute(COUNT); - super.start(ctx); + super.end(ctx); } } ]]>