[
https://issues.apache.org/jira/browse/NIFI-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14525457#comment-14525457
]
Mark Latimer commented on NIFI-571:
-----------------------------------
Sorry about that. If have understood the issue correct a further change is
required for the tests.
> 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
> Attachments: 0001-type-check-StandardControllerServiceProvider.patch,
> 0002-type-check-TestStandardControllerService.patch,
> 0003-Check-list-of-lists-for-ControllerServiceNode.patch
>
>
> 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)