aboutsummaryrefslogtreecommitdiffstats
path: root/service-monitor/src/main/java/com/yahoo/vespa/service/health/StateV1HealthClient.java
diff options
context:
space:
mode:
Diffstat (limited to 'service-monitor/src/main/java/com/yahoo/vespa/service/health/StateV1HealthClient.java')
-rw-r--r--service-monitor/src/main/java/com/yahoo/vespa/service/health/StateV1HealthClient.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/service-monitor/src/main/java/com/yahoo/vespa/service/health/StateV1HealthClient.java b/service-monitor/src/main/java/com/yahoo/vespa/service/health/StateV1HealthClient.java
index 7d20a96873d..5d32264bd18 100644
--- a/service-monitor/src/main/java/com/yahoo/vespa/service/health/StateV1HealthClient.java
+++ b/service-monitor/src/main/java/com/yahoo/vespa/service/health/StateV1HealthClient.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.vespa.service.health;
-import ai.vespa.json.Jackson;
+import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.logging.Level;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
@@ -23,6 +23,7 @@ import static com.yahoo.yolean.Exceptions.uncheck;
public class StateV1HealthClient implements AutoCloseable {
private static final long MAX_CONTENT_LENGTH = 1L << 20; // 1 MB
+ private static final ObjectMapper MAPPER = new ObjectMapper();
private static final Logger logger = Logger.getLogger(StateV1HealthClient.class.getName());
private final ApacheHttpClient httpClient;
private final Function<HttpEntity, String> getContentFunction;
@@ -53,7 +54,7 @@ public class StateV1HealthClient implements AutoCloseable {
throw new IllegalArgumentException("Content too long: " + contentLength + " bytes");
}
String body = getContentFunction.apply(bodyEntity);
- HealthResponse healthResponse = Jackson.mapper().readValue(body, HealthResponse.class);
+ HealthResponse healthResponse = MAPPER.readValue(body, HealthResponse.class);
if (healthResponse.status == null || healthResponse.status.code == null) {
return HealthInfo.fromHealthStatusCode(HealthResponse.Status.DEFAULT_STATUS);