Github user olegz commented on a diff in the pull request:
https://github.com/apache/nifi/pull/126#discussion_r44976221
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java
---
@@ -545,23 +546,16 @@ public void enableReferencingServices(final
ControllerServiceNode serviceNode) {
}
private void enableReferencingServices(final ControllerServiceNode
serviceNode, final List<ControllerServiceNode> recursiveReferences) {
- if (serviceNode.getState() != ControllerServiceState.ENABLED &&
serviceNode.getState() != ControllerServiceState.ENABLING) {
+ if (serviceNode.getState() != ControllerServiceState.ENABLING &&
serviceNode.getState() != ControllerServiceState.ENABLED) {
serviceNode.verifyCanEnable(new
HashSet<>(recursiveReferences));
}
final Set<ControllerServiceNode> ifEnabled = new HashSet<>();
- final List<ControllerServiceNode> toEnable =
findRecursiveReferences(serviceNode, ControllerServiceNode.class);
- for (final ControllerServiceNode nodeToEnable : toEnable) {
+ for (final ControllerServiceNode nodeToEnable :
recursiveReferences) {
final ControllerServiceState state = nodeToEnable.getState();
- if (state != ControllerServiceState.ENABLED && state !=
ControllerServiceState.ENABLING) {
+ if (state != ControllerServiceState.ENABLING && state !=
ControllerServiceState.ENABLED) {
nodeToEnable.verifyCanEnable(ifEnabled);
ifEnabled.add(nodeToEnable);
- }
- }
-
- for (final ControllerServiceNode nodeToEnable : toEnable) {
--- End diff --
I see your point, let me put it back and I'll document it in code as well
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---