mirror of https://github.com/apache/nifi.git
NIFI-11032: Addressing NPE when retrieving registry client info with unauthorized user (#6879)
This commit is contained in:
parent
b426226207
commit
bf871e0b8d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue