summaryrefslogtreecommitdiffstats
path: root/vespaclient-java
diff options
context:
space:
mode:
Diffstat (limited to 'vespaclient-java')
-rw-r--r--vespaclient-java/src/main/java/com/yahoo/vespa/filedistribution/status/FileDistributionStatusClient.java5
-rw-r--r--vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java5
2 files changed, 4 insertions, 6 deletions
diff --git a/vespaclient-java/src/main/java/com/yahoo/vespa/filedistribution/status/FileDistributionStatusClient.java b/vespaclient-java/src/main/java/com/yahoo/vespa/filedistribution/status/FileDistributionStatusClient.java
index 8bb3bda1cb4..6e688c7737e 100644
--- a/vespaclient-java/src/main/java/com/yahoo/vespa/filedistribution/status/FileDistributionStatusClient.java
+++ b/vespaclient-java/src/main/java/com/yahoo/vespa/filedistribution/status/FileDistributionStatusClient.java
@@ -1,9 +1,9 @@
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.filedistribution.status;
+import ai.vespa.json.Jackson;
import ai.vespa.util.http.hc5.VespaHttpClientBuilder;
import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
import io.airlift.airline.Command;
import io.airlift.airline.HelpOption;
import io.airlift.airline.Option;
@@ -102,10 +102,9 @@ public class FileDistributionStatusClient {
}
String parseAndGenerateOutput(String json) {
- ObjectMapper objectMapper = new ObjectMapper();
JsonNode jsonNode;
try {
- jsonNode = objectMapper.readTree(json);
+ jsonNode = Jackson.mapper().readTree(json);
} catch (IOException e) {
throw new RuntimeException(e);
}
diff --git a/vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java b/vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java
index 2ea38a75ea0..223d62ea323 100644
--- a/vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java
+++ b/vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java
@@ -1,7 +1,7 @@
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespaget;
-import com.fasterxml.jackson.databind.ObjectMapper;
+import ai.vespa.json.Jackson;
import com.yahoo.document.DataType;
import com.yahoo.document.Document;
import com.yahoo.document.DocumentId;
@@ -182,9 +182,8 @@ public class DocumentRetrieverTest {
documentRetriever.retrieveDocuments();
verify(mockedSession, times(3)).syncSend(any());
- ObjectMapper m = new ObjectMapper();
@SuppressWarnings("unchecked")
- List<Map<String, Object>> feed = m.readValue(outContent.toByteArray(), List.class);
+ List<Map<String, Object>> feed = Jackson.mapper().readValue(outContent.toByteArray(), List.class);
assertEquals(DOC_ID_1, feed.get(0).get("id"));
assertEquals(DOC_ID_2, feed.get(1).get("id"));
assertEquals(DOC_ID_3, feed.get(2).get("id"));