diff options
author | Harald Musum <musum@verizonmedia.com> | 2022-12-02 23:09:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-02 23:09:25 +0100 |
commit | afcf1bb71cb7b87a03149d197f724cfc7603ef92 (patch) | |
tree | fff1df3e68101edc3d3d3b98b5eb51b7758c209c /container-search/src/main/java/com/yahoo/search/query/profile/types/FieldDescription.java | |
parent | 7f870bf3cb8dd0a3d015a448608ba7291a783932 (diff) | |
parent | fcf664e1a6bb9890bd54ff4f8b78497236152bf2 (diff) |
Merge pull request #25096 from vespa-engine/revert-25091-revert-25088-balder/immutablelist-2-listv8.94.46
Revert "Revert "Let list handling catch up with Java 17""
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/query/profile/types/FieldDescription.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/query/profile/types/FieldDescription.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/types/FieldDescription.java b/container-search/src/main/java/com/yahoo/search/query/profile/types/FieldDescription.java index f30a3cc5ae6..8fdbf8b2281 100644 --- a/container-search/src/main/java/com/yahoo/search/query/profile/types/FieldDescription.java +++ b/container-search/src/main/java/com/yahoo/search/query/profile/types/FieldDescription.java @@ -1,11 +1,9 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.search.query.profile.types; -import com.google.common.collect.ImmutableList; import com.yahoo.processing.request.CompoundName; import com.yahoo.search.query.profile.QueryProfile; -import java.util.Arrays; import java.util.List; /** @@ -96,14 +94,14 @@ public class FieldDescription implements Comparable<FieldDescription> { if (name.isCompound() && ! aliases.isEmpty()) throw new IllegalArgumentException("Aliases are not allowed with compound names"); - this.aliases = ImmutableList.copyOf(aliases); + this.aliases = List.copyOf(aliases); this.mandatory = mandatory; this.overridable = overridable; } private static List<String> toList(String string) { - if (string == null || string.isEmpty()) return ImmutableList.of(); - return ImmutableList.copyOf(Arrays.asList(string.split(" "))); + if (string == null || string.isEmpty()) return List.of(); + return List.of(string.split(" ")); } /** Returns the full name of this as a string */ |