mirror of
https://github.com/apache/nifi.git
synced 2025-03-06 01:19:49 +00:00
NIFI-2388: Addressed a spot that assumes that Process Group is always set on StandardControllerServiceNode
This commit is contained in:
parent
bc0b5fe154
commit
70d70732b5
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user