From ef535f6c51393d945d9fe07de38de224d5ae443f Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Thu, 23 Nov 2023 16:07:43 +0100 Subject: 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. --- .../vespa/filedistribution/status/FileDistributionStatusClient.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'vespaclient-java/src/main/java') 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); } -- cgit v1.2.3