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 <joewitt@apache.org>
This commit is contained in:
Mark Payne 2023-02-13 18:19:22 -05:00 committed by Joe Witt
parent 1014359c64
commit 471cccbbda
No known key found for this signature in database
GPG Key ID: 9093BF854F811A1A
1 changed files with 1 additions and 1 deletions

View File

@ -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());
}