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_r378495890
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
 ##########
 @@ -5018,9 +5018,11 @@ public void verifyCanUpdate(final VersionedFlowSnapshot 
updatedFlow, final boole
             final Map<String, VersionedConnection> proposedConnections = new 
HashMap<>();
             findAllConnections(updatedFlow.getFlowContents(), 
proposedConnections);
 
-            findAllConnections().stream()
-                    .filter(conn -> conn.getVersionedComponentId().isPresent())
-                    .forEach(conn -> 
proposedConnections.remove(conn.getVersionedComponentId().get()));
+            for (Connection conn : flowManager.findAllConnections()) {
 
 Review comment:
   Same comment as above. Here, I think we need to use the existing 
`findAllConnections()` method. We only want to change to 
`flowManager.findAllConnections()` when calling it on the root process group.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to