From 911b12f28d1a6584eb9a0f849f6e953fad840b86 Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Fri, 25 Oct 2019 18:04:15 +0200 Subject: [PATCH] Fix JsonParser deprecation See gh-18750 --- .../elasticsearch/ElasticsearchJestHealthIndicatorTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchJestHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchJestHealthIndicatorTests.java index 7012121b4c..0f84f58134 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchJestHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchJestHealthIndicatorTests.java @@ -132,7 +132,7 @@ class ElasticsearchJestHealthIndicatorTests { json = "{\n \"error\": \"Server Error\",\n \"status\": \"" + status + "\"\n}"; } searchResult.setJsonString(json); - searchResult.setJsonObject(new JsonParser().parse(json).getAsJsonObject()); + searchResult.setJsonObject(JsonParser.parseString(json).getAsJsonObject()); searchResult.setResponseCode(responseCode); searchResult.setSucceeded(succeeded); return searchResult;