Addressing NPE when retrieving registry client info with unauthorized user
@@ -1646,9 +1646,11 @@ public class FlowResource extends ApplicationResource {
private FlowRegistryClientEntity populateRemainingRegistryClientEntityContent(final FlowRegistryClientEntity flowRegistryClientEntity) {
flowRegistryClientEntity.setUri(generateResourceUri("controller", "registry-clients", flowRegistryClientEntity.getId()));
+ if (flowRegistryClientEntity.getComponent() != null) {
if (flowRegistryClientEntity.getComponent().getType().equals(NIFI_REGISTRY_TYPE)) {
flowRegistryClientEntity.getComponent().setUri(flowRegistryClientEntity.getComponent().getProperties().get("url"));
}
+ }
return flowRegistryClientEntity;
}
