This is an automated email from the ASF dual-hosted git repository.
joewitt 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 471cccbbda NIFI-11176: This closes #6948. When comparing a
VersionedConnection with an existing connection, we examined the source
component's VersionedComponentId. But the existing component may not have a
VersionedComponentId. We should only be comparing these if they are populated
471cccbbda is described below
commit 471cccbbdac0b9216a710fa9fc1c77bccf0eb553
Author: Mark Payne <[email protected]>
AuthorDate: Mon Feb 13 18:19:22 2023 -0500
NIFI-11176: This closes #6948. When comparing a VersionedConnection with an
existing connection, we examined the source component's VersionedComponentId.
But the existing component may not have a VersionedComponentId. We should only
be comparing these if they are populated
Signed-off-by: Joe Witt <[email protected]>
---
.../flow/synchronization/StandardVersionedComponentSynchronizer.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/flow/synchronization/StandardVersionedComponentSynchronizer.java
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java
index 519089f048..3401aa5acd 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java
@@ -631,7 +631,7 @@ public class StandardVersionedComponentSynchronizer
implements VersionedComponen
final String proposedSourceId =
proposedConnection.getSource().getId();
final String existingSourceId =
existingConnection.getSource().getVersionedComponentId().orElse(null);
- if (!Objects.equals(proposedSourceId, existingSourceId)) {
+ if (existingSourceId != null &&
!Objects.equals(proposedSourceId, existingSourceId)) {
connectionsRemovedDueToChangingSourceId.add(proposedConnection.getIdentifier());
connectionsRemoved.add(proposedConnection.getIdentifier());
}