From 068c97a3d814bb47302c43709014d3194e4f8ade Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Tue, 23 Aug 2016 10:24:46 -0400 Subject: [PATCH] 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 --- .../java/org/apache/nifi/controller/FlowController.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 ad5c87b9ab11..4e675583f4db 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 void instantiateSnippet(final ProcessGroup group, final FlowSnippetDTO dt 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());