This is an automated email from the ASF dual-hosted git repository.

thenatog pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new f2a16cd  NIFI-8163: When counting number of components, we traverse 
into all Process Groups, but then call findAllRemoteProcessGroups, which is a 
recursive call, instead of calling getRemoteProcessGroups(). This results in 
counting the Process Groups many times. So fixed that.
f2a16cd is described below

commit f2a16cd02e80734f3f5e7c66c8d82211a659e34b
Author: Mark Payne <[email protected]>
AuthorDate: Thu Jan 21 13:08:10 2021 -0500

    NIFI-8163: When counting number of components, we traverse into all Process 
Groups, but then call findAllRemoteProcessGroups, which is a recursive call, 
instead of calling getRemoteProcessGroups(). This results in counting the 
Process Groups many times. So fixed that.
    
    Signed-off-by: Nathan Gough <[email protected]>
    
    This closes #4775.
---
 .../src/main/java/org/apache/nifi/groups/StandardProcessGroup.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
index 4941673..294faa5 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
@@ -443,7 +443,7 @@ public final class StandardProcessGroup implements 
ProcessGroup {
                 syncFailure += childCounts.getSyncFailureCount();
             }
 
-            for (final RemoteProcessGroup remoteGroup : 
findAllRemoteProcessGroups()) {
+            for (final RemoteProcessGroup remoteGroup : 
getRemoteProcessGroups()) {
                 // Count only input ports that have incoming connections
                 for (final Port port : remoteGroup.getInputPorts()) {
                     if (port.hasIncomingConnection()) {

Reply via email to