NIFI-571: Removed checking List<List<ControllerServiceNode>> to see if it 
contains a ControllerServiceNode, as it would always return false; intent was 
to check all inner Lists, but it's really not necessary (a bit of an 
optimization) that just confuses things


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/facc4242
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/facc4242
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/facc4242

Branch: refs/heads/develop
Commit: facc4242bd1cf601fb2fc6b81745f7867c207616
Parents: 0898971
Author: Mark Payne <[email protected]>
Authored: Fri Jun 5 16:01:09 2015 -0400
Committer: Mark Payne <[email protected]>
Committed: Mon Jun 8 20:20:34 2015 -0400

----------------------------------------------------------------------
 .../service/StandardControllerServiceProvider.java    | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/facc4242/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java
----------------------------------------------------------------------
diff --git 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java
 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java
index d8506c1..f0de8d2 100644
--- 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java
+++ 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java
@@ -357,7 +357,7 @@ public class StandardControllerServiceProvider implements 
ControllerServiceProvi
 
                                     if (bulletinRepo != null) {
                                         
bulletinRepo.addBulletin(BulletinFactory.createBulletin(
-                                                "Controller Service", 
Severity.ERROR.name(), "Could not start " + serviceNode + " due to " + e));
+                                            "Controller Service", 
Severity.ERROR.name(), "Could not start " + serviceNode + " due to " + e));
                                     }
                                 }
                             }
@@ -391,10 +391,6 @@ public class StandardControllerServiceProvider implements 
ControllerServiceProvi
         final List<List<ControllerServiceNode>> orderedNodeLists = new 
ArrayList<>();
 
         for (final ControllerServiceNode node : serviceNodeMap.values()) {
-            if (orderedNodeLists.contains(node)) {
-                continue;   // this node is already in the list.
-            }
-
             final List<ControllerServiceNode> branch = new ArrayList<>();
             determineEnablingOrder(serviceNodeMap, node, branch, new 
HashSet<ControllerServiceNode>());
             orderedNodeLists.add(branch);
@@ -404,10 +400,10 @@ public class StandardControllerServiceProvider implements 
ControllerServiceProvi
     }
 
     private static void determineEnablingOrder(
-            final Map<String, ControllerServiceNode> serviceNodeMap,
-            final ControllerServiceNode contextNode,
-            final List<ControllerServiceNode> orderedNodes,
-            final Set<ControllerServiceNode> visited) {
+        final Map<String, ControllerServiceNode> serviceNodeMap,
+        final ControllerServiceNode contextNode,
+        final List<ControllerServiceNode> orderedNodes,
+        final Set<ControllerServiceNode> visited) {
         if (visited.contains(contextNode)) {
             return;
         }

Reply via email to