Skip to content

Commit

Permalink
Fix ContainX#825 - NullPointerException in HttpClient connector
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierlemasle committed Sep 21, 2016
1 parent c71dc82 commit 87ffede
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ public Map<String, String> headers() {
@Override
public <T> T readEntity(Class<T> typeToReadAs) {
HttpEntity entity = response.getEntity();
if (entity == null || entity.getContent() == null)
return null;
try {
return ObjectMapperSingleton.getContext(typeToReadAs).reader(typeToReadAs).readValue(entity.getContent());
} catch (Exception e) {
Expand Down

0 comments on commit 87ffede

Please sign in to comment.