NIFI-12994 Fix potential NPE when requesting Flow Analysis Results for a Process Group

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #8595.
This commit is contained in:
tpalfy 2024-04-02 18:28:48 +02:00 committed by Pierre Villard
parent 0bd3635ff9
commit 3a29d72a7c
No known key found for this signature in database
GPG Key ID: F92A93B30C07C6D5
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ public class StandardRuleViolationsManager implements RuleViolationsManager {
public Collection<RuleViolation> getRuleViolationsForGroup(String groupId) {
Set<RuleViolation> groupViolations = subjectIdToRuleViolation.values().stream()
.map(Map::values).flatMap(Collection::stream)
.filter(violation -> violation.getGroupId().equals(groupId))
.filter(violation -> groupId.equals(violation.getGroupId()))
.collect(Collectors.toSet());
return groupViolations;