You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2019/09/03 15:32:33 UTC

[nifi] branch master updated: NIFI-6028 Protect against null VersionedComponent when finding relevant process group

This is an automated email from the ASF dual-hosted git repository.

markap14 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/master by this push:
     new 180a188  NIFI-6028 Protect against null VersionedComponent when finding relevant process group
180a188 is described below

commit 180a188096905ec3c599f45a4c0235778951fb7c
Author: Bryan Bende <bb...@apache.org>
AuthorDate: Tue Sep 3 10:50:54 2019 -0400

    NIFI-6028 Protect against null VersionedComponent when finding relevant process group
    
    This closes #3686.
    
    Signed-off-by: Mark Payne <ma...@hotmail.com>
---
 .../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 8e94a5b..d2d331d 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;
             }