-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EA-3704 add info endpoint languages supported logic at stratup #45
Conversation
@@ -83,7 +120,7 @@ public <T> T getTranslationApiResponse(WebClient webClient, Function<UriBuilder, | |||
} | |||
|
|||
LOGGER.debug("Translation API Client call failed - {}", e.getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should add the LOGGER.isDebugEnabled() condition
return builder.build(); | ||
}; | ||
} | ||
|
||
private static JsonNode getConfigNode(String json) throws TranslationApiException { | ||
if (!StringUtils.isEmpty(json)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a more efficient way to extract the required JsonNode only, which will simplify significantly this code:
https://cassiomolin.com/programming/using-jackson-and-json-pointer-to-query-and-parse-an-arbitrary-json-node/
would be nice to update the implementation to use this approach
ObjectMapper mapper = new ObjectMapper();
JsonNode node = mapper.readTree(json);
JsonNode coordinatesNode = node.at("/address/coordinates");
No description provided.