Skip to content

Commit

Permalink
Merge pull request #1381 from veraPDF/rule_tags
Browse files Browse the repository at this point in the history
Fix NullPointerException for rule without tags
  • Loading branch information
MaximPlusov authored Oct 12, 2023
2 parents 0be9838 + ea13739 commit 888dafc
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,21 @@ static ValidationDetails fromValues(final ValidationResult result, boolean logPa
assertionMap.get(rule.getRuleId()), logPassedChecks, failedChecksMap.get(rule.getRuleId()), rule.getTags()) :
RuleSummaryImpl.uncheckedInstance(rule.getRuleId(), rule.getDescription(), rule.getObject(), rule.getTest(), rule.getTags());
failedChecks += summary.getFailedChecks();
Set<String> summaryTags = summary.getTags();
if (summary.getRuleStatus() == Status.PASSED) {
passedRules++;
if (logPassedChecks) {
ruleSummaries.add(summary);
tags.addAll(summary.getTags());
if (summaryTags != null) {
tags.addAll(summaryTags);
}
}
} else {
failedRules++;
ruleSummaries.add(summary);
tags.addAll(summary.getTags());
if (summaryTags != null) {
tags.addAll(summaryTags);
}
}
}
int passedChecks = result.getTotalAssertions() - failedChecks;
Expand Down

0 comments on commit 888dafc

Please sign in to comment.