NIFI-11032: Addressing NPE when retrieving registry client info with unauthorized user (#6879)

This commit is contained in:
Joe Gresock 2023-01-23 15:51:25 -05:00 committed by GitHub
parent b426226207
commit bf871e0b8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -1646,8 +1646,10 @@ public class FlowResource extends ApplicationResource {
private FlowRegistryClientEntity populateRemainingRegistryClientEntityContent(final FlowRegistryClientEntity flowRegistryClientEntity) {
flowRegistryClientEntity.setUri(generateResourceUri("controller", "registry-clients", flowRegistryClientEntity.getId()));
if (flowRegistryClientEntity.getComponent().getType().equals(NIFI_REGISTRY_TYPE)) {
flowRegistryClientEntity.getComponent().setUri(flowRegistryClientEntity.getComponent().getProperties().get("url"));
if (flowRegistryClientEntity.getComponent() != null) {
if (flowRegistryClientEntity.getComponent().getType().equals(NIFI_REGISTRY_TYPE)) {
flowRegistryClientEntity.getComponent().setUri(flowRegistryClientEntity.getComponent().getProperties().get("url"));
}
}
return flowRegistryClientEntity;