diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-01-18 07:13:53 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-01-18 07:13:53 +0100 |
commit | 592674c7317fd1e97107ed700fb7a039ef9365a7 (patch) | |
tree | 20a129c1f77a137c5c9d6cc2404ccc9b8743002d /routing-generator | |
parent | 88a74a85691ee861f89669954a317781db000ab9 (diff) |
Just use Streams.toList as that is unmdifiable.
Diffstat (limited to 'routing-generator')
-rw-r--r-- | routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/RoutingTable.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/RoutingTable.java b/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/RoutingTable.java index de3207fda2e..7f9f04ed691 100644 --- a/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/RoutingTable.java +++ b/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/RoutingTable.java @@ -154,7 +154,7 @@ public class RoutingTable { this.instance = Objects.requireNonNull(instance); this.zone = Objects.requireNonNull(zone); this.cluster = Objects.requireNonNull(cluster); - this.reals = Objects.requireNonNull(reals).stream().sorted().collect(Collectors.toUnmodifiableList()); + this.reals = Objects.requireNonNull(reals).stream().sorted().toList(); for (int i = 0; i < reals.size(); i++) { for (int j = 0; j < i; j++) { if (reals.get(i).equals(reals.get(j))) { |