Adding a uniform configuration for all json/yaml mapper use cases: part 1

This commit is contained in:
Sergey Skrobotov
2023-02-23 16:11:05 -08:00
parent 6ee9c6ad46
commit b9b4e3fdd8
38 changed files with 250 additions and 121 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2021-2022 Signal Messenger, LLC
* Copyright 2021 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -81,7 +81,7 @@ public class HCaptchaClient implements CaptchaClient {
throw new IOException("hCaptcha http failure : " + response.statusCode());
}
final HCaptchaResponse hCaptchaResponse = SystemMapper.getMapper()
final HCaptchaResponse hCaptchaResponse = SystemMapper.jsonMapper()
.readValue(response.body(), HCaptchaResponse.class);
logger.debug("received hCaptcha response: {}", hCaptchaResponse);