summaryrefslogtreecommitdiffstats
path: root/http-client
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-01-18 07:13:53 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2023-01-18 07:13:53 +0100
commit592674c7317fd1e97107ed700fb7a039ef9365a7 (patch)
tree20a129c1f77a137c5c9d6cc2404ccc9b8743002d /http-client
parent88a74a85691ee861f89669954a317781db000ab9 (diff)
Just use Streams.toList as that is unmdifiable.
Diffstat (limited to 'http-client')
-rw-r--r--http-client/src/main/java/ai/vespa/hosted/client/HttpClient.java3
1 files changed, 1 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 4da887f0cbb..10ef20980e6 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
@@ -30,7 +30,6 @@ import java.util.stream.IntStream;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Objects.requireNonNull;
-import static java.util.stream.Collectors.toUnmodifiableList;
/**
* @author jonmv
@@ -265,7 +264,7 @@ public interface HttpClient extends Closeable {
/** Attempts each request against the host the specified number of times. */
static HostStrategy repeating(URI host, int count) {
- return ordered(IntStream.range(0, count).mapToObj(__ -> host).collect(toUnmodifiableList()));
+ return ordered(IntStream.range(0, count).mapToObj(__ -> host).toList());
}
}