aboutsummaryrefslogtreecommitdiffstats
path: root/vespaclient-java/src/main/java/com
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-11-23 16:07:43 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2023-11-23 16:12:51 +0100
commitef535f6c51393d945d9fe07de38de224d5ae443f (patch)
tree2f5976537a200aebbf6644b8e1ef93f2c669319d /vespaclient-java/src/main/java/com
parentf966346429c85fc31c8ea962b518e02a19f77f46 (diff)
jackson 2.16 changes some of its default settings so we consolidate our use of the ObjectMapper.
Unless special options are used, use a common instance, or create via factory metod.
Diffstat (limited to 'vespaclient-java/src/main/java/com')
-rw-r--r--vespaclient-java/src/main/java/com/yahoo/vespa/filedistribution/status/FileDistributionStatusClient.java5
1 files changed, 2 insertions, 3 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);
}