{"action":"created","comment":{"url":"https://api.github.com/repos/Alfresco/alfresco-data-model/pulls/comments/200958327","pull_request_review_id":135364710,"id":200958327,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDk1ODMyNw==","diff_hunk":"@@ -38,10 +38,9 @@\n     public static <T> T copy(T source)\n     {\n         T target = null;\n-        try\n+        try ( CopyOutputStream cos = new CopyOutputStream();\n+                ObjectOutputStream out = new ObjectOutputStream(cos) )\n         {\n-            CopyOutputStream cos = new CopyOutputStream();\n-            ObjectOutputStream out = new ObjectOutputStream(cos);\n             out.writeObject(source);\n             out.flush();\n             out.close();","path":"src/main/java/org/alfresco/opencmis/CMISUtils.java","position":12,"original_position":12,"commit_id":"52801c1e5b7a4badbdea5a2a1a0d6ccb6825892d","original_commit_id":"52801c1e5b7a4badbdea5a2a1a0d6ccb6825892d","user":{"login":"ancutam","id":17044035,"node_id":"MDQ6VXNlcjE3MDQ0MDM1","avatar_url":"https://avatars0.githubusercontent.com/u/17044035?v=4","gravatar_id":"","url":"https://api.github.com/users/ancutam","html_url":"https://github.com/ancutam","followers_url":"https://api.github.com/users/ancutam/followers","following_url":"https://api.github.com/users/ancutam/following{/other_user}","gists_url":"https://api.github.com/users/ancutam/gists{/gist_id}","starred_url":"https://api.github.com/users/ancutam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ancutam/subscriptions","organizations_url":"https://api.github.com/users/ancutam/orgs","repos_url":"https://api.github.com/users/ancutam/repos","events_url":"https://api.github.com/users/ancutam/events{/privacy}","received_events_url":"https://api.github.com/users/ancutam/received_events","type":"User","site_admin":false},"body":"`out.close()` is called automatically, so you can delete this line too.","created_at":"2018-07-09T10:45:05Z","updated_at":"2018-07-09T10:45:05Z","html_url":"https://github.com/Alfresco/alfresco-data-model/pull/20#discussion_r200958327","pull_request_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/pulls/20","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Alfresco/alfresco-data-model/pulls/comments/200958327"},"html":{"href":"https://github.com/Alfresco/alfresco-data-model/pull/20#discussion_r200958327"},"pull_request":{"href":"https://api.github.com/repos/Alfresco/alfresco-data-model/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/Alfresco/alfresco-data-model/pulls/20","id":200055687,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMDU1Njg3","html_url":"https://github.com/Alfresco/alfresco-data-model/pull/20","diff_url":"https://github.com/Alfresco/alfresco-data-model/pull/20.diff","patch_url":"https://github.com/Alfresco/alfresco-data-model/pull/20.patch","issue_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/issues/20","number":20,"state":"open","locked":false,"title":"Use java 8 try with resource for closing the streams properly","user":{"login":"mmuller88","id":18393842,"node_id":"MDQ6VXNlcjE4MzkzODQy","avatar_url":"https://avatars0.githubusercontent.com/u/18393842?v=4","gravatar_id":"","url":"https://api.github.com/users/mmuller88","html_url":"https://github.com/mmuller88","followers_url":"https://api.github.com/users/mmuller88/followers","following_url":"https://api.github.com/users/mmuller88/following{/other_user}","gists_url":"https://api.github.com/users/mmuller88/gists{/gist_id}","starred_url":"https://api.github.com/users/mmuller88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmuller88/subscriptions","organizations_url":"https://api.github.com/users/mmuller88/orgs","repos_url":"https://api.github.com/users/mmuller88/repos","events_url":"https://api.github.com/users/mmuller88/events{/privacy}","received_events_url":"https://api.github.com/users/mmuller88/received_events","type":"User","site_admin":false},"body":"Use java 8 try with resource for closing the streams properly","created_at":"2018-07-09T10:26:35Z","updated_at":"2018-07-09T10:45:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4ca369b93124f12bd39e692b9fac83173f9868f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/pulls/20/commits","review_comments_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/pulls/20/comments","review_comment_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/issues/20/comments","statuses_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/statuses/52801c1e5b7a4badbdea5a2a1a0d6ccb6825892d","head":{"label":"Alfresco:fix/Sonar-Close-Open-Streams","ref":"fix/Sonar-Close-Open-Streams","sha":"52801c1e5b7a4badbdea5a2a1a0d6ccb6825892d","user":{"login":"Alfresco","id":391127,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MTEyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/391127?v=4","gravatar_id":"","url":"https://api.github.com/users/Alfresco","html_url":"https://github.com/Alfresco","followers_url":"https://api.github.com/users/Alfresco/followers","following_url":"https://api.github.com/users/Alfresco/following{/other_user}","gists_url":"https://api.github.com/users/Alfresco/gists{/gist_id}","starred_url":"https://api.github.com/users/Alfresco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alfresco/subscriptions","organizations_url":"https://api.github.com/users/Alfresco/orgs","repos_url":"https://api.github.com/users/Alfresco/repos","events_url":"https://api.github.com/users/Alfresco/events{/privacy}","received_events_url":"https://api.github.com/users/Alfresco/received_events","type":"Organization","site_admin":false},"repo":{"id":80006223,"node_id":"MDEwOlJlcG9zaXRvcnk4MDAwNjIyMw==","name":"alfresco-data-model","full_name":"Alfresco/alfresco-data-model","owner":{"login":"Alfresco","id":391127,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MTEyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/391127?v=4","gravatar_id":"","url":"https://api.github.com/users/Alfresco","html_url":"https://github.com/Alfresco","followers_url":"https://api.github.com/users/Alfresco/followers","following_url":"https://api.github.com/users/Alfresco/following{/other_user}","gists_url":"https://api.github.com/users/Alfresco/gists{/gist_id}","starred_url":"https://api.github.com/users/Alfresco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alfresco/subscriptions","organizations_url":"https://api.github.com/users/Alfresco/orgs","repos_url":"https://api.github.com/users/Alfresco/repos","events_url":"https://api.github.com/users/Alfresco/events{/privacy}","received_events_url":"https://api.github.com/users/Alfresco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Alfresco/alfresco-data-model","description":null,"fork":false,"url":"https://api.github.com/repos/Alfresco/alfresco-data-model","forks_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/forks","keys_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/teams","hooks_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/hooks","issue_events_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/issues/events{/number}","events_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/events","assignees_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/assignees{/user}","branches_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/branches{/branch}","tags_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/tags","blobs_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/statuses/{sha}","languages_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/languages","stargazers_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/stargazers","contributors_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/contributors","subscribers_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/subscribers","subscription_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/subscription","commits_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/contents/{+path}","compare_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/merges","archive_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/downloads","issues_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/issues{/number}","pulls_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/pulls{/number}","milestones_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/milestones{/number}","notifications_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/labels{/name}","releases_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/releases{/id}","deployments_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/deployments","created_at":"2017-01-25T10:56:14Z","updated_at":"2018-06-26T06:02:02Z","pushed_at":"2018-07-09T10:26:35Z","git_url":"git://github.com/Alfresco/alfresco-data-model.git","ssh_url":"git@github.com:Alfresco/alfresco-data-model.git","clone_url":"https://github.com/Alfresco/alfresco-data-model.git","svn_url":"https://github.com/Alfresco/alfresco-data-model","homepage":null,"size":883,"stargazers_count":9,"watchers_count":9,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":4,"open_issues":1,"watchers":9,"default_branch":"master"}},"base":{"label":"Alfresco:master","ref":"master","sha":"8d52c566c299b0ad965bfd9dfebcbef7c509b672","user":{"login":"Alfresco","id":391127,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MTEyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/391127?v=4","gravatar_id":"","url":"https://api.github.com/users/Alfresco","html_url":"https://github.com/Alfresco","followers_url":"https://api.github.com/users/Alfresco/followers","following_url":"https://api.github.com/users/Alfresco/following{/other_user}","gists_url":"https://api.github.com/users/Alfresco/gists{/gist_id}","starred_url":"https://api.github.com/users/Alfresco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alfresco/subscriptions","organizations_url":"https://api.github.com/users/Alfresco/orgs","repos_url":"https://api.github.com/users/Alfresco/repos","events_url":"https://api.github.com/users/Alfresco/events{/privacy}","received_events_url":"https://api.github.com/users/Alfresco/received_events","type":"Organization","site_admin":false},"repo":{"id":80006223,"node_id":"MDEwOlJlcG9zaXRvcnk4MDAwNjIyMw==","name":"alfresco-data-model","full_name":"Alfresco/alfresco-data-model","owner":{"login":"Alfresco","id":391127,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MTEyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/391127?v=4","gravatar_id":"","url":"https://api.github.com/users/Alfresco","html_url":"https://github.com/Alfresco","followers_url":"https://api.github.com/users/Alfresco/followers","following_url":"https://api.github.com/users/Alfresco/following{/other_user}","gists_url":"https://api.github.com/users/Alfresco/gists{/gist_id}","starred_url":"https://api.github.com/users/Alfresco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alfresco/subscriptions","organizations_url":"https://api.github.com/users/Alfresco/orgs","repos_url":"https://api.github.com/users/Alfresco/repos","events_url":"https://api.github.com/users/Alfresco/events{/privacy}","received_events_url":"https://api.github.com/users/Alfresco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Alfresco/alfresco-data-model","description":null,"fork":false,"url":"https://api.github.com/repos/Alfresco/alfresco-data-model","forks_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/forks","keys_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/teams","hooks_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/hooks","issue_events_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/issues/events{/number}","events_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/events","assignees_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/assignees{/user}","branches_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/branches{/branch}","tags_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/tags","blobs_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/statuses/{sha}","languages_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/languages","stargazers_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/stargazers","contributors_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/contributors","subscribers_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/subscribers","subscription_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/subscription","commits_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/contents/{+path}","compare_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/merges","archive_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/downloads","issues_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/issues{/number}","pulls_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/pulls{/number}","milestones_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/milestones{/number}","notifications_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/labels{/name}","releases_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/releases{/id}","deployments_url":"https://api.github.com/repos/Alfresco/alfresco-data-model/deployments","created_at":"2017-01-25T10:56:14Z","updated_at":"2018-06-26T06:02:02Z","pushed_at":"2018-07-09T10:26:35Z","git_url":"git://github.com/Alfresco/alfresco-data-model.git","ssh_url":"git@github.com:Alfresco/alfresco-data-model.git","clone_url":"https://github.com/Alfresco/alfresco-data-model.git","svn_url":"https://github.com/Alfresco/alfresco-data-model","homepage":null,"size":883,"stargazers_count":9,"watchers_count":9,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":4,"open_issues":1,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Alfresco/alfresco-data-model/pulls/20"},"html":{"href":"https://github.com/Alfresco/alfresco-data-model/pull/20"},"issue":{"href":"https://api.github.com/repos/Alfresco/alfresco-data-model/issues/20"},"comments":{"href":"https://api.github.com/repos/Alfresco/alfresco-data-model/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/Alfresco/alfresco-data-model/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/Alfresco/alfresco-data-model/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Alfresco/alfresco-data-model/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/Alfresco/alfresco-data-model/statuses/52801c1e5b7a4badbdea5a2a1a0d6ccb6825892d"}},"author_association":"NONE"}}
{"actor":{"display_login":"ancutam"}}