Mark Latimer created NIFI-571:
---------------------------------

             Summary: Findbugs issue in StandardControllerServiceProvider
                 Key: NIFI-571
                 URL: https://issues.apache.org/jira/browse/NIFI-571
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
    Affects Versions: 0.0.2
            Reporter: Mark Latimer
            Priority: Minor


I am trying and mostly failing to understand a findbugs issue in 
StandardControllerServiceProvider.

The error reported is an invalid type error where a ControllerServiceNode is 
checked against a List of Lists of ControllerServicesNodes. I am inclined to 
agree this a level of indirection off.

{code}
  static List<List<ControllerServiceNode>> determineEnablingOrder(final 
Map<String, ControllerServiceNode> serviceNodeMap) {
        final List<List<ControllerServiceNode>> orderedNodeLists = new 
ArrayList<List<ControllerServiceNode>>();

        for (final ControllerServiceNode node : serviceNodeMap.values()) {
//Node is a ControllerServiceNode but orderedList is a List of Lists of 
ControllerService nodes
            if (orderedNodeLists.contains(node)) { 
                continue;   // this node is already in the list.
            }

            final List<ControllerServiceNode> branch = new 
ArrayList<ControllerServiceNode>();
            determineEnablingOrder(serviceNodeMap, node, branch, new 
HashSet<ControllerServiceNode>());
            orderedNodeLists.add(branch);
        }

        return orderedNodeLists;
    }
{code}





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to