Fix embarrassing NPE in audit trail.
relates elastic/x-pack-elasticsearch#3988 Original commit: elastic/x-pack-elasticsearch@72c16ea50f
This commit is contained in:
parent
c621be626f
commit
5833ed296e
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue