NIFI-2388: Addressed a spot that assumes that Process Group is always set on StandardControllerServiceNode

This commit is contained in:
Mark Payne 2016-07-29 10:57:33 -04:00 committed by joewitt
parent bc0b5fe154
commit 70d70732b5
1 changed files with 6 additions and 6 deletions

View File

@ -168,12 +168,12 @@ public class StandardControllerServiceNode extends AbstractConfiguredComponent i
@Override
public List<ControllerServiceNode> getRequiredControllerServices() {
Set<ControllerServiceNode> requiredServices = new HashSet<>();
for (Entry<PropertyDescriptor, String> 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<PropertyDescriptor, String> 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);