Skip to content

Commit 63b6620

Browse files
committed
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 google/gson#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.
1 parent 5f19d58 commit 63b6620

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

client/src/main/java/ai/vespa/client/dsl/FixedQuery.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
22
package ai.vespa.client.dsl;
33

4-
import com.google.gson.internal.LinkedHashTreeMap;
5-
64
import java.math.BigDecimal;
75
import java.util.HashMap;
6+
import java.util.LinkedHashMap;
87
import java.util.Map;
98
import java.util.concurrent.atomic.AtomicInteger;
109
import java.util.stream.Collectors;
@@ -359,7 +358,7 @@ public Map<String, String> buildQueryMap() {
359358
}
360359
sb.append(";");
361360

362-
queryMap = new LinkedHashTreeMap<>(); // for the order
361+
queryMap = new LinkedHashMap<>(); // for the order
363362
queryMap.put("yql", sb.toString());
364363
queryMap.putAll(others);
365364
queryMap.putAll(getUserInputs());

0 commit comments

Comments
 (0)