Skip to content

Commit 7de861b

Browse files
committed
Merge pull request #18750 from dreis2211
* pr/18750: Fix JsonParser deprecation Closes gh-18750
2 parents 4058f99 + 911b12f commit 7de861b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchJestHealthIndicatorTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ private static JestResult createJestResult(int responseCode, boolean succeeded,
132132
json = "{\n \"error\": \"Server Error\",\n \"status\": \"" + status + "\"\n}";
133133
}
134134
searchResult.setJsonString(json);
135-
searchResult.setJsonObject(new JsonParser().parse(json).getAsJsonObject());
135+
searchResult.setJsonObject(JsonParser.parseString(json).getAsJsonObject());
136136
searchResult.setResponseCode(responseCode);
137137
searchResult.setSucceeded(succeeded);
138138
return searchResult;

0 commit comments

Comments
 (0)