We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the following code, JsonApiClient.java:
@Override protected <T> T unmarshall(HttpResponse response, TypeReference<T> clazz) throws IOException { if (response.getEntity() == null || clazz.getType().equals(Void.class)) { EntityUtils.consume(response.getEntity()); return null; } InputStream inputStream = response.getEntity().getContent(); JsonParser parser = objectMapper.getFactory().createParser(inputStream); T toReturn = parser.readValueAs(clazz); EntityUtils.consume(response.getEntity()); return toReturn; }
The response is not properly consumed if "parser.readValueAs(clazz)" throws an exception.
The EntityUtils.consume call should be placed in a finally block.
The text was updated successfully, but these errors were encountered:
No longer a problem in the current version
Sorry, something went wrong.
No branches or pull requests
In the following code, JsonApiClient.java:
The response is not properly consumed if "parser.readValueAs(clazz)" throws an exception.
The EntityUtils.consume call should be placed in a finally block.
The text was updated successfully, but these errors were encountered: