I faced this issue today on foreign project which was claimed as 'working'. Here is a fix:
try (CloseableHttpResponse response = httpClient.execute(request)) { ... }