You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by pv...@apache.org on 2017/01/30 21:18:16 UTC

nifi git commit: NIFI-3180 Fixed NPE in TemplateUtils added null check for ProcessorDTO.getRelationship() removed deprecated usage of ByteArrayInputStream

Repository: nifi
Updated Branches:
  refs/heads/master 910c1fa6f -> 6518778c1


NIFI-3180 Fixed NPE in TemplateUtils
added null check for ProcessorDTO.getRelationship()
removed deprecated usage of ByteArrayInputStream

This closes #1451.


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/6518778c
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/6518778c
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/6518778c

Branch: refs/heads/master
Commit: 6518778c1158e52461d832ab18c44d1a5ed5cefb
Parents: 910c1fa
Author: Oleg Zhurakousky <ol...@suitcase.io>
Authored: Sun Jan 29 09:17:35 2017 -0500
Committer: Pierre Villard <pi...@gmail.com>
Committed: Mon Jan 30 22:10:50 2017 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/nifi/controller/TemplateUtils.java  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/6518778c/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/TemplateUtils.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/TemplateUtils.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/TemplateUtils.java
index 759edb5..24abd5f 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/TemplateUtils.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/TemplateUtils.java
@@ -17,6 +17,7 @@
 
 package org.apache.nifi.controller;
 
+import java.io.ByteArrayInputStream;
 import java.io.DataInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -31,7 +32,6 @@ import javax.xml.bind.Unmarshaller;
 import javax.xml.transform.dom.DOMSource;
 
 import org.apache.nifi.persistence.TemplateDeserializer;
-import org.apache.nifi.stream.io.ByteArrayInputStream;
 import org.apache.nifi.stream.io.StreamUtils;
 import org.apache.nifi.web.api.dto.ConnectableDTO;
 import org.apache.nifi.web.api.dto.ConnectionDTO;
@@ -193,8 +193,10 @@ public class TemplateUtils {
                 processorConfig.setAutoTerminatedRelationships(null);
             }
 
-            for (final RelationshipDTO relationship : processorDTO.getRelationships()) {
-                relationship.setDescription(null);
+            if (processorDTO.getRelationships() != null) {
+                for (final RelationshipDTO relationship : processorDTO.getRelationships()) {
+                    relationship.setDescription(null);
+                }
             }
 
             processorDTO.setValidationErrors(null);