Fix NPE on TransportActionListener for elasticsearch 2
@@ -76,7 +76,7 @@ public class TransportActionListener<T extends ActionResponse> implements Action
if (response instanceof BaseNodesResponse) {
final BaseNodesResponse resp = (BaseNodesResponse) response;
- if (resp.failures().length > 0) {
+ if (resp.failures() != null && resp.failures().length > 0) {
span.setTag("elasticsearch.node.failures", resp.failures().length);
}
span.setTag("elasticsearch.node.cluster.name", resp.getClusterName().value());
