Avoid NPE when viewing Provenance Event details on a disconnected node
This closes
@@ -294,10 +294,13 @@ public class ProvenanceEventResource extends ApplicationResource {
// populate the cluster node address
final ClusterCoordinator coordinator = getClusterCoordinator();
- if (coordinator != null) {
+ if (coordinator != null && clusterNodeId != null) {
final NodeIdentifier nodeId = coordinator.getNodeIdentifier(clusterNodeId);
+
+ if (nodeId != null) {
event.setClusterNodeAddress(nodeId.getApiAddress() + ":" + nodeId.getApiPort());
}
+ }
// create a response entity
final ProvenanceEventEntity entity = new ProvenanceEventEntity();
