From d1fbf19ec7de7ff286ebf8d09d4f6fcfb2723ca9 Mon Sep 17 00:00:00 2001 From: Bryan Bende Date: Sun, 29 Sep 2024 09:54:38 -0400 Subject: [PATCH] NIFI-13817 Protect against null asset ids when synchronizing parameter context This closes #9324 Signed-off-by: Joseph Witt --- .../controller/serialization/VersionedFlowSynchronizer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/serialization/VersionedFlowSynchronizer.java b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/serialization/VersionedFlowSynchronizer.java index 44affcbcfd..942d2f5ac8 100644 --- a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/serialization/VersionedFlowSynchronizer.java +++ b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/serialization/VersionedFlowSynchronizer.java @@ -944,7 +944,7 @@ public class VersionedFlowSynchronizer implements FlowSynchronizer { for (final VersionedParameter parameter : versionedParameterContext.getParameters()) { final String parameterName = parameter.getName(); final String currentValue = currentValues.get(parameterName); - final Set currentAssetIds = currentAssetReferences.get(parameterName); + final Set currentAssetIds = currentAssetReferences.getOrDefault(parameterName, Collections.emptySet()); final Parameter updatedParameterObject = parameters.get(parameterName); final String updatedValue = updatedParameterObject.getValue();