From c168ecc6e5a64aad854e3965b4b8cd4d33036c6e Mon Sep 17 00:00:00 2001 From: Ryan Gustafson Date: Sat, 18 Apr 2009 08:21:27 +0000 Subject: [PATCH] Correct -benchmark reporting of Rule visits via the RuleChain git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x@6912 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd/etc/changelog.txt | 1 + pmd/src/net/sourceforge/pmd/AbstractRuleChainVisitor.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pmd/etc/changelog.txt b/pmd/etc/changelog.txt index ad6f3b85c5..dcf4de816f 100644 --- a/pmd/etc/changelog.txt +++ b/pmd/etc/changelog.txt @@ -4,6 +4,7 @@ Fixed bug 2590258 - NPE with nicerhtml output Fixed bug 2317099 - False + in SimplifyCondition Fixed bug 2606609 - False "UnusedImports" positive in package-info.java Fixed bug 2645268 - ClassCastException in UselessOperationOnImmutable.getDeclaration +Correct -benchmark reporting of Rule visits via the RuleChain Android ruleset: CallSuperLast rule now also checks for finish() redefinitions diff --git a/pmd/src/net/sourceforge/pmd/AbstractRuleChainVisitor.java b/pmd/src/net/sourceforge/pmd/AbstractRuleChainVisitor.java index 536e1da49a..517459b7db 100644 --- a/pmd/src/net/sourceforge/pmd/AbstractRuleChainVisitor.java +++ b/pmd/src/net/sourceforge/pmd/AbstractRuleChainVisitor.java @@ -59,9 +59,9 @@ public abstract class AbstractRuleChainVisitor implements RuleChainVisitor { continue; } // For each rule, allow it to visit the nodes it desires - int visits = 0; start = System.nanoTime(); for (Rule rule: ruleSetRules.get(ruleSet)) { + int visits = 0; final List nodeNames = rule.getRuleChainVisits(); for (int j = 0; j < nodeNames.size(); j++) { List nodes = nodeNameToNodes.get(nodeNames.get(j));