You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/02/12 20:33:20 UTC

[GitHub] [nifi] markap14 commented on a change in pull request #4026: NIFI-7087: Use FlowManager.findAllConnections() when available

markap14 commented on a change in pull request #4026: NIFI-7087: Use FlowManager.findAllConnections() when available
URL: https://github.com/apache/nifi/pull/4026#discussion_r378495549
 
 

 ##########
 File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
 ##########
 @@ -4894,7 +4894,7 @@ public void verifyCanUpdate(final VersionedFlowSnapshot updatedFlow, final boole
                 // any connection that does exist in the proposed flow. This results in us having a Map whose values are those Connections
                 // that were removed. We can then check for any connections that have data in them. If any Connection is to be removed but
                 // has data, then we should throw an IllegalStateException.
-                findAllConnections().forEach(conn -> removedConnectionByVersionedId.put(conn.getVersionedComponentId().orElse(conn.getIdentifier()), conn));
+                flowManager.findAllConnections().forEach(conn -> removedConnectionByVersionedId.put(conn.getVersionedComponentId().orElse(conn.getIdentifier()), conn));
 
 Review comment:
   I think this call is actually changing the logic. `findAllConnections()` here is going to return all Connections in this ProcessGroup and any children/descendant groups. This changes it from "all connections here and below" to "all connections in the canvas," which I don't think is what we want.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services