{"action":"created","comment":{"url":"https://api.github.com/repos/jsonld-java/jsonld-java/pulls/comments/45127081","id":45127081,"diff_hunk":"@@ -118,54 +116,55 @@ public InputStream openStreamFromURL(java.net.URL url) throws IOException {\n         // or whatever is available\n         request.addHeader(\"Accept\", ACCEPT_HEADER);\n \n-        final HttpResponse response = getHttpClient().execute(request);\n+        final CloseableHttpResponse response = getHttpClient().execute(request);\n         final int status = response.getStatusLine().getStatusCode();\n         if (status != 200 && status != 203) {\n+            response.close();","path":"core/src/main/java/com/github/jsonldjava/core/DocumentLoader.java","position":39,"original_position":39,"commit_id":"a986877c78f398e514dfa53b2b13d07f687041f5","original_commit_id":"a986877c78f398e514dfa53b2b13d07f687041f5","user":{"login":"ansell","id":82365,"avatar_url":"https://avatars.githubusercontent.com/u/82365?v=3","gravatar_id":"","url":"https://api.github.com/users/ansell","html_url":"https://github.com/ansell","followers_url":"https://api.github.com/users/ansell/followers","following_url":"https://api.github.com/users/ansell/following{/other_user}","gists_url":"https://api.github.com/users/ansell/gists{/gist_id}","starred_url":"https://api.github.com/users/ansell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansell/subscriptions","organizations_url":"https://api.github.com/users/ansell/orgs","repos_url":"https://api.github.com/users/ansell/repos","events_url":"https://api.github.com/users/ansell/events{/privacy}","received_events_url":"https://api.github.com/users/ansell/received_events","type":"User","site_admin":false},"body":"It may be useful to put this in a try block to ensure that our preferred exception below always gets thrown with our informative message, rather than a message that just indicates the close failed.","created_at":"2015-11-17T21:52:31Z","updated_at":"2015-11-17T21:52:31Z","html_url":"https://github.com/jsonld-java/jsonld-java/pull/161#discussion_r45127081","pull_request_url":"https://api.github.com/repos/jsonld-java/jsonld-java/pulls/161","_links":{"self":{"href":"https://api.github.com/repos/jsonld-java/jsonld-java/pulls/comments/45127081"},"html":{"href":"https://github.com/jsonld-java/jsonld-java/pull/161#discussion_r45127081"},"pull_request":{"href":"https://api.github.com/repos/jsonld-java/jsonld-java/pulls/161"}}},"pull_request":{"url":"https://api.github.com/repos/jsonld-java/jsonld-java/pulls/161","id":50991670,"html_url":"https://github.com/jsonld-java/jsonld-java/pull/161","diff_url":"https://github.com/jsonld-java/jsonld-java/pull/161.diff","patch_url":"https://github.com/jsonld-java/jsonld-java/pull/161.patch","issue_url":"https://api.github.com/repos/jsonld-java/jsonld-java/issues/161","number":161,"state":"open","locked":false,"title":"fixes #160 updating some http client code to latest api","user":{"login":"kaefer3000","id":6708974,"avatar_url":"https://avatars.githubusercontent.com/u/6708974?v=3","gravatar_id":"","url":"https://api.github.com/users/kaefer3000","html_url":"https://github.com/kaefer3000","followers_url":"https://api.github.com/users/kaefer3000/followers","following_url":"https://api.github.com/users/kaefer3000/following{/other_user}","gists_url":"https://api.github.com/users/kaefer3000/gists{/gist_id}","starred_url":"https://api.github.com/users/kaefer3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaefer3000/subscriptions","organizations_url":"https://api.github.com/users/kaefer3000/orgs","repos_url":"https://api.github.com/users/kaefer3000/repos","events_url":"https://api.github.com/users/kaefer3000/events{/privacy}","received_events_url":"https://api.github.com/users/kaefer3000/received_events","type":"User","site_admin":false},"body":"It is hard to come up with a testcase for #160 because I don't know how to test for hanging. Nevertheless, this patch fixes #160 by closing the response (https://github.com/jsonld-java/jsonld-java/compare/master...kaefer3000:master#diff-eb9bf0691266ec47924e78c27645604bR122). To close the response, I had to make sure that the HTTPresponses are closeable. To achieve that, also the responses from the cache had to be closeable. To get there, I had to update the code to the latest http client api. Yet, now the JarCache does not work any more (see https://github.com/jsonld-java/jsonld-java/compare/master...kaefer3000:master#diff-eb9bf0691266ec47924e78c27645604bR150 . By re-enabling it, a test case fails).","created_at":"2015-11-17T19:23:47Z","updated_at":"2015-11-17T21:52:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eafe262295465aa27de418e629b329026482da1c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jsonld-java/jsonld-java/pulls/161/commits","review_comments_url":"https://api.github.com/repos/jsonld-java/jsonld-java/pulls/161/comments","review_comment_url":"https://api.github.com/repos/jsonld-java/jsonld-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jsonld-java/jsonld-java/issues/161/comments","statuses_url":"https://api.github.com/repos/jsonld-java/jsonld-java/statuses/a986877c78f398e514dfa53b2b13d07f687041f5","head":{"label":"kaefer3000:master","ref":"master","sha":"a986877c78f398e514dfa53b2b13d07f687041f5","user":{"login":"kaefer3000","id":6708974,"avatar_url":"https://avatars.githubusercontent.com/u/6708974?v=3","gravatar_id":"","url":"https://api.github.com/users/kaefer3000","html_url":"https://github.com/kaefer3000","followers_url":"https://api.github.com/users/kaefer3000/followers","following_url":"https://api.github.com/users/kaefer3000/following{/other_user}","gists_url":"https://api.github.com/users/kaefer3000/gists{/gist_id}","starred_url":"https://api.github.com/users/kaefer3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaefer3000/subscriptions","organizations_url":"https://api.github.com/users/kaefer3000/orgs","repos_url":"https://api.github.com/users/kaefer3000/repos","events_url":"https://api.github.com/users/kaefer3000/events{/privacy}","received_events_url":"https://api.github.com/users/kaefer3000/received_events","type":"User","site_admin":false},"repo":{"id":46352409,"name":"jsonld-java","full_name":"kaefer3000/jsonld-java","owner":{"login":"kaefer3000","id":6708974,"avatar_url":"https://avatars.githubusercontent.com/u/6708974?v=3","gravatar_id":"","url":"https://api.github.com/users/kaefer3000","html_url":"https://github.com/kaefer3000","followers_url":"https://api.github.com/users/kaefer3000/followers","following_url":"https://api.github.com/users/kaefer3000/following{/other_user}","gists_url":"https://api.github.com/users/kaefer3000/gists{/gist_id}","starred_url":"https://api.github.com/users/kaefer3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaefer3000/subscriptions","organizations_url":"https://api.github.com/users/kaefer3000/orgs","repos_url":"https://api.github.com/users/kaefer3000/repos","events_url":"https://api.github.com/users/kaefer3000/events{/privacy}","received_events_url":"https://api.github.com/users/kaefer3000/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kaefer3000/jsonld-java","description":"JSON-LD implementation for Java","fork":true,"url":"https://api.github.com/repos/kaefer3000/jsonld-java","forks_url":"https://api.github.com/repos/kaefer3000/jsonld-java/forks","keys_url":"https://api.github.com/repos/kaefer3000/jsonld-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaefer3000/jsonld-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaefer3000/jsonld-java/teams","hooks_url":"https://api.github.com/repos/kaefer3000/jsonld-java/hooks","issue_events_url":"https://api.github.com/repos/kaefer3000/jsonld-java/issues/events{/number}","events_url":"https://api.github.com/repos/kaefer3000/jsonld-java/events","assignees_url":"https://api.github.com/repos/kaefer3000/jsonld-java/assignees{/user}","branches_url":"https://api.github.com/repos/kaefer3000/jsonld-java/branches{/branch}","tags_url":"https://api.github.com/repos/kaefer3000/jsonld-java/tags","blobs_url":"https://api.github.com/repos/kaefer3000/jsonld-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaefer3000/jsonld-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaefer3000/jsonld-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaefer3000/jsonld-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaefer3000/jsonld-java/statuses/{sha}","languages_url":"https://api.github.com/repos/kaefer3000/jsonld-java/languages","stargazers_url":"https://api.github.com/repos/kaefer3000/jsonld-java/stargazers","contributors_url":"https://api.github.com/repos/kaefer3000/jsonld-java/contributors","subscribers_url":"https://api.github.com/repos/kaefer3000/jsonld-java/subscribers","subscription_url":"https://api.github.com/repos/kaefer3000/jsonld-java/subscription","commits_url":"https://api.github.com/repos/kaefer3000/jsonld-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaefer3000/jsonld-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaefer3000/jsonld-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaefer3000/jsonld-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaefer3000/jsonld-java/contents/{+path}","compare_url":"https://api.github.com/repos/kaefer3000/jsonld-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaefer3000/jsonld-java/merges","archive_url":"https://api.github.com/repos/kaefer3000/jsonld-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaefer3000/jsonld-java/downloads","issues_url":"https://api.github.com/repos/kaefer3000/jsonld-java/issues{/number}","pulls_url":"https://api.github.com/repos/kaefer3000/jsonld-java/pulls{/number}","milestones_url":"https://api.github.com/repos/kaefer3000/jsonld-java/milestones{/number}","notifications_url":"https://api.github.com/repos/kaefer3000/jsonld-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaefer3000/jsonld-java/labels{/name}","releases_url":"https://api.github.com/repos/kaefer3000/jsonld-java/releases{/id}","created_at":"2015-11-17T14:31:07Z","updated_at":"2015-11-17T14:31:09Z","pushed_at":"2015-11-17T19:16:28Z","git_url":"git://github.com/kaefer3000/jsonld-java.git","ssh_url":"git@github.com:kaefer3000/jsonld-java.git","clone_url":"https://github.com/kaefer3000/jsonld-java.git","svn_url":"https://github.com/kaefer3000/jsonld-java","homepage":"","size":1930,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jsonld-java:master","ref":"master","sha":"b2dcff1fb48cb62a8546348372fc4590a633c720","user":{"login":"jsonld-java","id":4359856,"avatar_url":"https://avatars.githubusercontent.com/u/4359856?v=3","gravatar_id":"","url":"https://api.github.com/users/jsonld-java","html_url":"https://github.com/jsonld-java","followers_url":"https://api.github.com/users/jsonld-java/followers","following_url":"https://api.github.com/users/jsonld-java/following{/other_user}","gists_url":"https://api.github.com/users/jsonld-java/gists{/gist_id}","starred_url":"https://api.github.com/users/jsonld-java/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsonld-java/subscriptions","organizations_url":"https://api.github.com/users/jsonld-java/orgs","repos_url":"https://api.github.com/users/jsonld-java/repos","events_url":"https://api.github.com/users/jsonld-java/events{/privacy}","received_events_url":"https://api.github.com/users/jsonld-java/received_events","type":"Organization","site_admin":false},"repo":{"id":2988730,"name":"jsonld-java","full_name":"jsonld-java/jsonld-java","owner":{"login":"jsonld-java","id":4359856,"avatar_url":"https://avatars.githubusercontent.com/u/4359856?v=3","gravatar_id":"","url":"https://api.github.com/users/jsonld-java","html_url":"https://github.com/jsonld-java","followers_url":"https://api.github.com/users/jsonld-java/followers","following_url":"https://api.github.com/users/jsonld-java/following{/other_user}","gists_url":"https://api.github.com/users/jsonld-java/gists{/gist_id}","starred_url":"https://api.github.com/users/jsonld-java/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsonld-java/subscriptions","organizations_url":"https://api.github.com/users/jsonld-java/orgs","repos_url":"https://api.github.com/users/jsonld-java/repos","events_url":"https://api.github.com/users/jsonld-java/events{/privacy}","received_events_url":"https://api.github.com/users/jsonld-java/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jsonld-java/jsonld-java","description":"JSON-LD implementation for Java","fork":false,"url":"https://api.github.com/repos/jsonld-java/jsonld-java","forks_url":"https://api.github.com/repos/jsonld-java/jsonld-java/forks","keys_url":"https://api.github.com/repos/jsonld-java/jsonld-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsonld-java/jsonld-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsonld-java/jsonld-java/teams","hooks_url":"https://api.github.com/repos/jsonld-java/jsonld-java/hooks","issue_events_url":"https://api.github.com/repos/jsonld-java/jsonld-java/issues/events{/number}","events_url":"https://api.github.com/repos/jsonld-java/jsonld-java/events","assignees_url":"https://api.github.com/repos/jsonld-java/jsonld-java/assignees{/user}","branches_url":"https://api.github.com/repos/jsonld-java/jsonld-java/branches{/branch}","tags_url":"https://api.github.com/repos/jsonld-java/jsonld-java/tags","blobs_url":"https://api.github.com/repos/jsonld-java/jsonld-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsonld-java/jsonld-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsonld-java/jsonld-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsonld-java/jsonld-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsonld-java/jsonld-java/statuses/{sha}","languages_url":"https://api.github.com/repos/jsonld-java/jsonld-java/languages","stargazers_url":"https://api.github.com/repos/jsonld-java/jsonld-java/stargazers","contributors_url":"https://api.github.com/repos/jsonld-java/jsonld-java/contributors","subscribers_url":"https://api.github.com/repos/jsonld-java/jsonld-java/subscribers","subscription_url":"https://api.github.com/repos/jsonld-java/jsonld-java/subscription","commits_url":"https://api.github.com/repos/jsonld-java/jsonld-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsonld-java/jsonld-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsonld-java/jsonld-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsonld-java/jsonld-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsonld-java/jsonld-java/contents/{+path}","compare_url":"https://api.github.com/repos/jsonld-java/jsonld-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsonld-java/jsonld-java/merges","archive_url":"https://api.github.com/repos/jsonld-java/jsonld-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsonld-java/jsonld-java/downloads","issues_url":"https://api.github.com/repos/jsonld-java/jsonld-java/issues{/number}","pulls_url":"https://api.github.com/repos/jsonld-java/jsonld-java/pulls{/number}","milestones_url":"https://api.github.com/repos/jsonld-java/jsonld-java/milestones{/number}","notifications_url":"https://api.github.com/repos/jsonld-java/jsonld-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsonld-java/jsonld-java/labels{/name}","releases_url":"https://api.github.com/repos/jsonld-java/jsonld-java/releases{/id}","created_at":"2011-12-15T16:04:37Z","updated_at":"2015-11-12T22:47:18Z","pushed_at":"2015-11-17T19:23:47Z","git_url":"git://github.com/jsonld-java/jsonld-java.git","ssh_url":"git@github.com:jsonld-java/jsonld-java.git","clone_url":"https://github.com/jsonld-java/jsonld-java.git","svn_url":"https://github.com/jsonld-java/jsonld-java","homepage":"","size":4017,"stargazers_count":144,"watchers_count":144,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":74,"mirror_url":null,"open_issues_count":23,"forks":74,"open_issues":23,"watchers":144,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jsonld-java/jsonld-java/pulls/161"},"html":{"href":"https://github.com/jsonld-java/jsonld-java/pull/161"},"issue":{"href":"https://api.github.com/repos/jsonld-java/jsonld-java/issues/161"},"comments":{"href":"https://api.github.com/repos/jsonld-java/jsonld-java/issues/161/comments"},"review_comments":{"href":"https://api.github.com/repos/jsonld-java/jsonld-java/pulls/161/comments"},"review_comment":{"href":"https://api.github.com/repos/jsonld-java/jsonld-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jsonld-java/jsonld-java/pulls/161/commits"},"statuses":{"href":"https://api.github.com/repos/jsonld-java/jsonld-java/statuses/a986877c78f398e514dfa53b2b13d07f687041f5"}}}}