NIFI-11039: Fixing bug when importing parameter providers from nifi-registry (#6868)

* NIFI-11039: Fixing NPE in registry retrieval
* NIFI-11039: Fixing bug when importing parameter providers from nifi registry
This commit is contained in:
Joe Gresock 2023-01-23 11:59:34 -05:00 committed by GitHub
parent cb77a96059
commit 8640989ad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -252,7 +252,9 @@ public class StandardVersionedComponentSynchronizer implements VersionedComponen
context.getFlowManager().withParameterContextResolution(() -> {
try {
synchronize(group, versionedExternalFlow.getFlowContents(), versionedExternalFlow.getParameterContexts(), versionedExternalFlow.getParameterProviders());
final Map<String, ParameterProviderReference> parameterProviderReferences = versionedExternalFlow.getParameterProviders() == null
? new HashMap<>() : versionedExternalFlow.getParameterProviders();
synchronize(group, versionedExternalFlow.getFlowContents(), versionedExternalFlow.getParameterContexts(), parameterProviderReferences);
} catch (final ProcessorInstantiationException pie) {
throw new RuntimeException(pie);
}

View File

@ -5411,6 +5411,7 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
externalFlow.setExternalControllerServices(flowSnapshot.getExternalControllerServices());
externalFlow.setParameterContexts(flowSnapshot.getParameterContexts());
externalFlow.setMetadata(externalFlowMetadata);
externalFlow.setParameterProviders(flowSnapshot.getParameterProviders());
return externalFlow;
}