Fix embarrassing NPE in audit trail.

relates elastic/x-pack-elasticsearch#3988

Original commit: elastic/x-pack-elasticsearch@72c16ea50f
This commit is contained in:
Albert Zaharovits 2018-02-19 20:11:57 +02:00
parent c621be626f
commit 5833ed296e
1 changed files with 1 additions and 1 deletions

View File

@ -514,7 +514,7 @@ public class LoggingAuditTrail extends AbstractComponent implements AuditTrail,
static Optional<String[]> indices(TransportMessage message) {
if (message instanceof IndicesRequest) {
return Optional.of(((IndicesRequest) message).indices());
return Optional.ofNullable(((IndicesRequest) message).indices());
}
return Optional.empty();
}