Skip to content

Commit

Permalink
Fix sonar issue
Browse files Browse the repository at this point in the history
  • Loading branch information
javiertuya committed Jun 30, 2024
1 parent 0af8629 commit 02e5371
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,11 @@ private ApiResponse apiExecute(HttpUriRequest request) {
request.setHeader(header[0], header[1]);

ApiResponse result;
try (final CloseableHttpClient client = HttpClients.createDefault()) {
result = client.execute(request, response -> {
return new ApiResponse(response.getCode(),
response.getReasonPhrase(),
EntityUtils.toString(response.getEntity()));
});
try (CloseableHttpClient client = HttpClients.createDefault()) {
result = client.execute(request, response ->
new ApiResponse(response.getCode(), response.getReasonPhrase(),
EntityUtils.toString(response.getEntity())
));
} catch (Exception e) {
throw new LoaderException(e);
}
Expand Down

0 comments on commit 02e5371

Please sign in to comment.