[ 
https://issues.apache.org/jira/browse/NIFI-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14579683#comment-14579683
 ] 

ASF subversion and git services commented on NIFI-571:
------------------------------------------------------

Commit facc4242bd1cf601fb2fc6b81745f7867c207616 in incubator-nifi's branch 
refs/heads/develop from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git;h=facc424 ]

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


> 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
>            Assignee: Mark Payne
>            Priority: Minor
>             Fix For: 0.2.0
>
>         Attachments: 
> 0001-NIFI-571-Removed-checking-List-List-ControllerServic.patch, 
> 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)

Reply via email to