From 63b6620b23c8093e22e18626e2eec0bf56806447 Mon Sep 17 00:00:00 2001 From: Yavor Paunov Date: Wed, 7 Sep 2022 23:08:54 -0400 Subject: [PATCH] Use Java standard map instead of GSON internal one LinkedHashTreeMap 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 LinkedHashMap 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 63d06e79998..f122171518c 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());