Repository: nifi
Updated Branches:
  refs/heads/master 3f60eac54 -> 8cc670c8a


NIFI-2634: Ensure that we check whether or not the Site-to-Site protocol is set 
when importing template, instead of assuming that it will be

This closes #921

Signed-off-by: jpercivall <[email protected]>


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

Branch: refs/heads/master
Commit: 8cc670c8a690efea8eee4d090486d724d0069cbd
Parents: 3f60eac
Author: Mark Payne <[email protected]>
Authored: Tue Aug 23 10:24:46 2016 -0400
Committer: jpercivall <[email protected]>
Committed: Tue Aug 23 11:19:44 2016 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/nifi/controller/FlowController.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/8cc670c8/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java
index ad5c87b..4e67558 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java
@@ -1739,7 +1739,12 @@ public class FlowController implements EventAccess, 
ControllerServiceProvider, R
                 
remoteGroup.setPosition(toPosition(remoteGroupDTO.getPosition()));
                 
remoteGroup.setCommunicationsTimeout(remoteGroupDTO.getCommunicationsTimeout());
                 
remoteGroup.setYieldDuration(remoteGroupDTO.getYieldDuration());
-                
remoteGroup.setTransportProtocol(SiteToSiteTransportProtocol.valueOf(remoteGroupDTO.getTransportProtocol()));
+                if (remoteGroupDTO.getTransportProtocol() == null) {
+                    
remoteGroup.setTransportProtocol(SiteToSiteTransportProtocol.RAW);
+                } else {
+                    
remoteGroup.setTransportProtocol(SiteToSiteTransportProtocol.valueOf(remoteGroupDTO.getTransportProtocol()));
+                }
+
                 remoteGroup.setProxyHost(remoteGroupDTO.getProxyHost());
                 remoteGroup.setProxyPort(remoteGroupDTO.getProxyPort());
                 remoteGroup.setProxyUser(remoteGroupDTO.getProxyUser());

Reply via email to