Skip to content

Commit

Permalink
Fixed dumping empty policy rules list.
Browse files Browse the repository at this point in the history
(cherry picked from commit 27f029b)
  • Loading branch information
mederly committed Sep 7, 2017
1 parent 76cc1c7 commit 5189ba4
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -1010,9 +1010,6 @@ static void dumpRulesIfNotEmpty(StringBuilder sb, String label, int indent, Coll
}

static void dumpRules(StringBuilder sb, String label, int indent, Collection<EvaluatedPolicyRule> policyRules) {
if (policyRules.isEmpty()) {
return;
}
sb.append("\n");
int triggered = getTriggeredRulesCount(policyRules);
DebugUtil.debugDumpLabel(sb, label + " (total " + policyRules.size() + ", triggered " + triggered + ")", indent);
Expand All @@ -1038,6 +1035,9 @@ static void dumpRules(StringBuilder sb, String label, int indent, Collection<Eva
sb.append("- triggered: ").append(dumpRule(rule));
}
}
if (policyRules.isEmpty()) {
sb.append(" (none)");
}
}

private static String dumpRule(EvaluatedPolicyRule rule) {
Expand Down

0 comments on commit 5189ba4

Please sign in to comment.