From 236aa521586aceffe49d512c8d9900f208ec86a5 Mon Sep 17 00:00:00 2001 From: Yavor Paunov Date: Wed, 7 Sep 2022 23:08:54 -0400 Subject: [PATCH] Use Java standard lib map instead of GSON internal one The is an internal class never intended for use outside of GSON. It was removed in https://github.com/google/gson/pull/1992 (version 2.9.0) and its use in this project prevents the GSON version from being bumped. The standard is a perfect drop-in replacement as it also preserves insertion order. --- client/src/main/java/ai/vespa/client/dsl/FixedQuery.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/main/java/ai/vespa/client/dsl/FixedQuery.java b/client/src/main/java/ai/vespa/client/dsl/FixedQuery.java index 63d06e799985..f122171518cd 100644 --- a/client/src/main/java/ai/vespa/client/dsl/FixedQuery.java +++ b/client/src/main/java/ai/vespa/client/dsl/FixedQuery.java @@ -1,10 +1,9 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package ai.vespa.client.dsl; -import com.google.gson.internal.LinkedHashTreeMap; - import java.math.BigDecimal; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -359,7 +358,7 @@ public Map buildQueryMap() { } sb.append(";"); - queryMap = new LinkedHashTreeMap<>(); // for the order + queryMap = new LinkedHashMap<>(); // for the order queryMap.put("yql", sb.toString()); queryMap.putAll(others); queryMap.putAll(getUserInputs());