From 70d70732b510283e8b22c603ab7db72589102d1e Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Fri, 29 Jul 2016 10:57:33 -0400 Subject: [PATCH] NIFI-2388: Addressed a spot that assumes that Process Group is always set on StandardControllerServiceNode --- .../service/StandardControllerServiceNode.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java index 7952d0fcef..0c1e6b3696 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java @@ -168,12 +168,12 @@ public class StandardControllerServiceNode extends AbstractConfiguredComponent i @Override public List getRequiredControllerServices() { Set requiredServices = new HashSet<>(); - for (Entry pEntry : this.getProperties().entrySet()) { - PropertyDescriptor descriptor = pEntry.getKey(); - if (descriptor.getControllerServiceDefinition() != null && pEntry.getValue() != null) { - ControllerServiceNode rNode = this.processGroup.getControllerService(pEntry.getValue()); - requiredServices.add(rNode); - requiredServices.addAll(rNode.getRequiredControllerServices()); + for (Entry entry : getProperties().entrySet()) { + PropertyDescriptor descriptor = entry.getKey(); + if (descriptor.getControllerServiceDefinition() != null && entry.getValue() != null) { + ControllerServiceNode requiredNode = serviceProvider.getControllerServiceNode(entry.getValue()); + requiredServices.add(requiredNode); + requiredServices.addAll(requiredNode.getRequiredControllerServices()); } } return new ArrayList<>(requiredServices);