From 180a188096905ec3c599f45a4c0235778951fb7c Mon Sep 17 00:00:00 2001 From: Bryan Bende Date: Tue, 3 Sep 2019 10:50:54 -0400 Subject: [PATCH] NIFI-6028 Protect against null VersionedComponent when finding relevant process group This closes #3686. Signed-off-by: Mark Payne --- .../src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java index 8e94a5b25a..d2d331d6b4 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java @@ -2472,7 +2472,8 @@ public final class DtoFactory { continue; } - final VersionedProcessGroup relevantProcessGroup = versionedGroups.get(difference.getComponentA().getGroupIdentifier()); + final VersionedComponent componentA = difference.getComponentA(); + final VersionedProcessGroup relevantProcessGroup = componentA == null ? null : versionedGroups.get(componentA.getGroupIdentifier()); if (relevantProcessGroup != null && FlowDifferenceFilters.isNewRelationshipAutoTerminatedAndDefaulted(difference, relevantProcessGroup, flowManager)) { continue; }