aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--http-client/src/main/java/ai/vespa/hosted/client/HttpClient.java3
-rw-r--r--http-client/src/test/java/ai/vespa/hosted/client/ApacheHttpClientTest.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/http-client/src/main/java/ai/vespa/hosted/client/HttpClient.java b/http-client/src/main/java/ai/vespa/hosted/client/HttpClient.java
index 173387b8fc3..c17ae63fda2 100644
--- a/http-client/src/main/java/ai/vespa/hosted/client/HttpClient.java
+++ b/http-client/src/main/java/ai/vespa/hosted/client/HttpClient.java
@@ -22,6 +22,7 @@ import java.io.UncheckedIOException;
import java.net.URI;
import java.time.Duration;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.function.Function;
@@ -90,7 +91,7 @@ public interface HttpClient extends Closeable {
/** Sets the parameter key/values for the request. Number of arguments must be even. Null values are omitted. */
default RequestBuilder parameters(String... pairs) {
- return parameters(List.of(pairs));
+ return parameters(Arrays.asList(pairs));
}
/** Sets the parameter key/values for the request. Number of arguments must be even. Pairs with {@code null} values are omitted. */
diff --git a/http-client/src/test/java/ai/vespa/hosted/client/ApacheHttpClientTest.java b/http-client/src/test/java/ai/vespa/hosted/client/ApacheHttpClientTest.java
index a80d80bb248..69e7ab6f744 100644
--- a/http-client/src/test/java/ai/vespa/hosted/client/ApacheHttpClientTest.java
+++ b/http-client/src/test/java/ai/vespa/hosted/client/ApacheHttpClientTest.java
@@ -60,7 +60,7 @@ class ApacheHttpClientTest {
URI.create("http://localhost:" + server.port() + "/"))),
Method.GET)
.at("root")
- .parameters("query", "foo")
+ .parameters("query", "foo", null, null)
.discard());
server.verify(2, getRequestedFor(urlEqualTo("/root?query=foo")));
server.verify(2, anyRequestedFor(anyUrl()));