diff --git a/common/src/main/java/com/traveltime/plugin/elasticsearch/ProtoFetcher.java b/common/src/main/java/com/traveltime/plugin/elasticsearch/ProtoFetcher.java index 88a1ef3..2b313b0 100644 --- a/common/src/main/java/com/traveltime/plugin/elasticsearch/ProtoFetcher.java +++ b/common/src/main/java/com/traveltime/plugin/elasticsearch/ProtoFetcher.java @@ -19,6 +19,7 @@ import java.net.URI; import java.security.Permission; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.function.Supplier; @@ -51,6 +52,10 @@ public ProtoFetcher(URI uri, String id, String key, Supplier permiss } public List getTimes(Coordinates origin, List destinations, int limit, Transportation mode, Country country, RequestType requestType) { + if(destinations.isEmpty()) { + return Collections.emptyList(); + } + val fastProto = TimeFilterFastProtoRequest .builder()