From 3a29d72a7c351a46a8a0550b50a392d97447d05b Mon Sep 17 00:00:00 2001 From: tpalfy Date: Tue, 2 Apr 2024 18:28:48 +0200 Subject: [PATCH] NIFI-12994 Fix potential NPE when requesting Flow Analysis Results for a Process Group Signed-off-by: Pierre Villard This closes #8595. --- .../apache/nifi/validation/StandardRuleViolationsManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/validation/StandardRuleViolationsManager.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/validation/StandardRuleViolationsManager.java index 5e232dcc1a..ff1a424081 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/validation/StandardRuleViolationsManager.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/validation/StandardRuleViolationsManager.java @@ -155,7 +155,7 @@ public class StandardRuleViolationsManager implements RuleViolationsManager { public Collection getRuleViolationsForGroup(String groupId) { Set 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;