moved property retrieval to within constructor - bugfix

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4624 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Brian Remedios
2006-10-11 03:43:09 +00:00
parent 5240919b79
commit ce664ea5fe

View File

@ -32,7 +32,7 @@ import java.util.Stack;
*/
public class CyclomaticComplexity extends AbstractRule {
private int reportLevel = getIntProperty("reportLevel");
private int reportLevel;
private static class Entry {
private SimpleNode node;
@ -59,6 +59,10 @@ public class CyclomaticComplexity extends AbstractRule {
private Stack entryStack = new Stack();
public CyclomaticComplexity() {
reportLevel = getIntProperty("reportLevel");
}
public Object visit(ASTIfStatement node, Object data) {
((Entry) entryStack.peek()).bumpDecisionPoints();
super.visit(node, data);