forked from phoedos/pmd
pmd: fix #1049 Errors in "How to write a rule"
This commit is contained in:
parent
e603844a53
commit
c080fdda08
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
]]>
|
||||
|
Loading…
x
Reference in New Issue
Block a user