{"action":"created","comment":{"url":"https://api.github.com/repos/Doist/TodoistPojos/pulls/comments/93300129","pull_request_review_id":13824813,"id":93300129,"diff_hunk":"@@ -8,4 +13,26 @@ static boolean equals(Object a, Object b) {\n     static int clamp(int val, int min, int max) {\n         return val < min ? min : (val > max ? max : val);\n     }\n+\n+    public static <T> Set<T> unmodifiableSet(Collection<? extends T> s) {\n+        if (s != null) {\n+            return Collections.unmodifiableSet(new HashSet<T>(s));\n+        } else {\n+            return Collections.emptySet();","path":"src/main/java/com/todoist/pojo/Utils.java","position":20,"original_position":20,"commit_id":"d6d492e05c7ee22715dc096fb34bd76512b43a4f","original_commit_id":"d6d492e05c7ee22715dc096fb34bd76512b43a4f","user":{"login":"goncalossilva","id":102931,"avatar_url":"https://avatars.githubusercontent.com/u/102931?v=3","gravatar_id":"","url":"https://api.github.com/users/goncalossilva","html_url":"https://github.com/goncalossilva","followers_url":"https://api.github.com/users/goncalossilva/followers","following_url":"https://api.github.com/users/goncalossilva/following{/other_user}","gists_url":"https://api.github.com/users/goncalossilva/gists{/gist_id}","starred_url":"https://api.github.com/users/goncalossilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goncalossilva/subscriptions","organizations_url":"https://api.github.com/users/goncalossilva/orgs","repos_url":"https://api.github.com/users/goncalossilva/repos","events_url":"https://api.github.com/users/goncalossilva/events{/privacy}","received_events_url":"https://api.github.com/users/goncalossilva/received_events","type":"User","site_admin":false},"body":"We should probably use `Collections. unmodifiableSet(Collections.emptySet())` (we can cache this as a static constant?), so that any changes to the empty set are consistent with any changes to a non-empty set (ie. crash).","created_at":"2016-12-20T18:50:19Z","updated_at":"2016-12-20T18:52:27Z","html_url":"https://github.com/Doist/TodoistPojos/pull/6#discussion_r93300129","pull_request_url":"https://api.github.com/repos/Doist/TodoistPojos/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/Doist/TodoistPojos/pulls/comments/93300129"},"html":{"href":"https://github.com/Doist/TodoistPojos/pull/6#discussion_r93300129"},"pull_request":{"href":"https://api.github.com/repos/Doist/TodoistPojos/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/Doist/TodoistPojos/pulls/6","id":98725798,"html_url":"https://github.com/Doist/TodoistPojos/pull/6","diff_url":"https://github.com/Doist/TodoistPojos/pull/6.diff","patch_url":"https://github.com/Doist/TodoistPojos/pull/6.patch","issue_url":"https://api.github.com/repos/Doist/TodoistPojos/issues/6","number":6,"state":"open","locked":false,"title":"Make collections in models unmodifiable","user":{"login":"rastislavvasko","id":159970,"avatar_url":"https://avatars.githubusercontent.com/u/159970?v=3","gravatar_id":"","url":"https://api.github.com/users/rastislavvasko","html_url":"https://github.com/rastislavvasko","followers_url":"https://api.github.com/users/rastislavvasko/followers","following_url":"https://api.github.com/users/rastislavvasko/following{/other_user}","gists_url":"https://api.github.com/users/rastislavvasko/gists{/gist_id}","starred_url":"https://api.github.com/users/rastislavvasko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rastislavvasko/subscriptions","organizations_url":"https://api.github.com/users/rastislavvasko/orgs","repos_url":"https://api.github.com/users/rastislavvasko/repos","events_url":"https://api.github.com/users/rastislavvasko/events{/privacy}","received_events_url":"https://api.github.com/users/rastislavvasko/received_events","type":"User","site_admin":false},"body":"Also chains Collaborator constructors to unify them with Item and Note constructors.","created_at":"2016-12-20T10:49:41Z","updated_at":"2016-12-20T18:52:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"050c87e6b549639a6725e3f70c991a7baa5e874c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Doist/TodoistPojos/pulls/6/commits","review_comments_url":"https://api.github.com/repos/Doist/TodoistPojos/pulls/6/comments","review_comment_url":"https://api.github.com/repos/Doist/TodoistPojos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Doist/TodoistPojos/issues/6/comments","statuses_url":"https://api.github.com/repos/Doist/TodoistPojos/statuses/d6d492e05c7ee22715dc096fb34bd76512b43a4f","head":{"label":"Doist:ft.unmodifiable","ref":"ft.unmodifiable","sha":"d6d492e05c7ee22715dc096fb34bd76512b43a4f","user":{"login":"Doist","id":2565372,"avatar_url":"https://avatars.githubusercontent.com/u/2565372?v=3","gravatar_id":"","url":"https://api.github.com/users/Doist","html_url":"https://github.com/Doist","followers_url":"https://api.github.com/users/Doist/followers","following_url":"https://api.github.com/users/Doist/following{/other_user}","gists_url":"https://api.github.com/users/Doist/gists{/gist_id}","starred_url":"https://api.github.com/users/Doist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Doist/subscriptions","organizations_url":"https://api.github.com/users/Doist/orgs","repos_url":"https://api.github.com/users/Doist/repos","events_url":"https://api.github.com/users/Doist/events{/privacy}","received_events_url":"https://api.github.com/users/Doist/received_events","type":"Organization","site_admin":false},"repo":{"id":23548924,"name":"TodoistPojos","full_name":"Doist/TodoistPojos","owner":{"login":"Doist","id":2565372,"avatar_url":"https://avatars.githubusercontent.com/u/2565372?v=3","gravatar_id":"","url":"https://api.github.com/users/Doist","html_url":"https://github.com/Doist","followers_url":"https://api.github.com/users/Doist/followers","following_url":"https://api.github.com/users/Doist/following{/other_user}","gists_url":"https://api.github.com/users/Doist/gists{/gist_id}","starred_url":"https://api.github.com/users/Doist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Doist/subscriptions","organizations_url":"https://api.github.com/users/Doist/orgs","repos_url":"https://api.github.com/users/Doist/repos","events_url":"https://api.github.com/users/Doist/events{/privacy}","received_events_url":"https://api.github.com/users/Doist/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Doist/TodoistPojos","description":"Todoist POJOs for Java and Android applications.","fork":false,"url":"https://api.github.com/repos/Doist/TodoistPojos","forks_url":"https://api.github.com/repos/Doist/TodoistPojos/forks","keys_url":"https://api.github.com/repos/Doist/TodoistPojos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Doist/TodoistPojos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Doist/TodoistPojos/teams","hooks_url":"https://api.github.com/repos/Doist/TodoistPojos/hooks","issue_events_url":"https://api.github.com/repos/Doist/TodoistPojos/issues/events{/number}","events_url":"https://api.github.com/repos/Doist/TodoistPojos/events","assignees_url":"https://api.github.com/repos/Doist/TodoistPojos/assignees{/user}","branches_url":"https://api.github.com/repos/Doist/TodoistPojos/branches{/branch}","tags_url":"https://api.github.com/repos/Doist/TodoistPojos/tags","blobs_url":"https://api.github.com/repos/Doist/TodoistPojos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Doist/TodoistPojos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Doist/TodoistPojos/git/refs{/sha}","trees_url":"https://api.github.com/repos/Doist/TodoistPojos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Doist/TodoistPojos/statuses/{sha}","languages_url":"https://api.github.com/repos/Doist/TodoistPojos/languages","stargazers_url":"https://api.github.com/repos/Doist/TodoistPojos/stargazers","contributors_url":"https://api.github.com/repos/Doist/TodoistPojos/contributors","subscribers_url":"https://api.github.com/repos/Doist/TodoistPojos/subscribers","subscription_url":"https://api.github.com/repos/Doist/TodoistPojos/subscription","commits_url":"https://api.github.com/repos/Doist/TodoistPojos/commits{/sha}","git_commits_url":"https://api.github.com/repos/Doist/TodoistPojos/git/commits{/sha}","comments_url":"https://api.github.com/repos/Doist/TodoistPojos/comments{/number}","issue_comment_url":"https://api.github.com/repos/Doist/TodoistPojos/issues/comments{/number}","contents_url":"https://api.github.com/repos/Doist/TodoistPojos/contents/{+path}","compare_url":"https://api.github.com/repos/Doist/TodoistPojos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Doist/TodoistPojos/merges","archive_url":"https://api.github.com/repos/Doist/TodoistPojos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Doist/TodoistPojos/downloads","issues_url":"https://api.github.com/repos/Doist/TodoistPojos/issues{/number}","pulls_url":"https://api.github.com/repos/Doist/TodoistPojos/pulls{/number}","milestones_url":"https://api.github.com/repos/Doist/TodoistPojos/milestones{/number}","notifications_url":"https://api.github.com/repos/Doist/TodoistPojos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Doist/TodoistPojos/labels{/name}","releases_url":"https://api.github.com/repos/Doist/TodoistPojos/releases{/id}","deployments_url":"https://api.github.com/repos/Doist/TodoistPojos/deployments","created_at":"2014-09-01T16:37:16Z","updated_at":"2016-11-11T16:20:28Z","pushed_at":"2016-12-20T18:51:41Z","git_url":"git://github.com/Doist/TodoistPojos.git","ssh_url":"git@github.com:Doist/TodoistPojos.git","clone_url":"https://github.com/Doist/TodoistPojos.git","svn_url":"https://github.com/Doist/TodoistPojos","homepage":"","size":126,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":5,"default_branch":"master"}},"base":{"label":"Doist:master","ref":"master","sha":"5ab02f423818af56670c2a066a64de8b4c6a8821","user":{"login":"Doist","id":2565372,"avatar_url":"https://avatars.githubusercontent.com/u/2565372?v=3","gravatar_id":"","url":"https://api.github.com/users/Doist","html_url":"https://github.com/Doist","followers_url":"https://api.github.com/users/Doist/followers","following_url":"https://api.github.com/users/Doist/following{/other_user}","gists_url":"https://api.github.com/users/Doist/gists{/gist_id}","starred_url":"https://api.github.com/users/Doist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Doist/subscriptions","organizations_url":"https://api.github.com/users/Doist/orgs","repos_url":"https://api.github.com/users/Doist/repos","events_url":"https://api.github.com/users/Doist/events{/privacy}","received_events_url":"https://api.github.com/users/Doist/received_events","type":"Organization","site_admin":false},"repo":{"id":23548924,"name":"TodoistPojos","full_name":"Doist/TodoistPojos","owner":{"login":"Doist","id":2565372,"avatar_url":"https://avatars.githubusercontent.com/u/2565372?v=3","gravatar_id":"","url":"https://api.github.com/users/Doist","html_url":"https://github.com/Doist","followers_url":"https://api.github.com/users/Doist/followers","following_url":"https://api.github.com/users/Doist/following{/other_user}","gists_url":"https://api.github.com/users/Doist/gists{/gist_id}","starred_url":"https://api.github.com/users/Doist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Doist/subscriptions","organizations_url":"https://api.github.com/users/Doist/orgs","repos_url":"https://api.github.com/users/Doist/repos","events_url":"https://api.github.com/users/Doist/events{/privacy}","received_events_url":"https://api.github.com/users/Doist/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Doist/TodoistPojos","description":"Todoist POJOs for Java and Android applications.","fork":false,"url":"https://api.github.com/repos/Doist/TodoistPojos","forks_url":"https://api.github.com/repos/Doist/TodoistPojos/forks","keys_url":"https://api.github.com/repos/Doist/TodoistPojos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Doist/TodoistPojos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Doist/TodoistPojos/teams","hooks_url":"https://api.github.com/repos/Doist/TodoistPojos/hooks","issue_events_url":"https://api.github.com/repos/Doist/TodoistPojos/issues/events{/number}","events_url":"https://api.github.com/repos/Doist/TodoistPojos/events","assignees_url":"https://api.github.com/repos/Doist/TodoistPojos/assignees{/user}","branches_url":"https://api.github.com/repos/Doist/TodoistPojos/branches{/branch}","tags_url":"https://api.github.com/repos/Doist/TodoistPojos/tags","blobs_url":"https://api.github.com/repos/Doist/TodoistPojos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Doist/TodoistPojos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Doist/TodoistPojos/git/refs{/sha}","trees_url":"https://api.github.com/repos/Doist/TodoistPojos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Doist/TodoistPojos/statuses/{sha}","languages_url":"https://api.github.com/repos/Doist/TodoistPojos/languages","stargazers_url":"https://api.github.com/repos/Doist/TodoistPojos/stargazers","contributors_url":"https://api.github.com/repos/Doist/TodoistPojos/contributors","subscribers_url":"https://api.github.com/repos/Doist/TodoistPojos/subscribers","subscription_url":"https://api.github.com/repos/Doist/TodoistPojos/subscription","commits_url":"https://api.github.com/repos/Doist/TodoistPojos/commits{/sha}","git_commits_url":"https://api.github.com/repos/Doist/TodoistPojos/git/commits{/sha}","comments_url":"https://api.github.com/repos/Doist/TodoistPojos/comments{/number}","issue_comment_url":"https://api.github.com/repos/Doist/TodoistPojos/issues/comments{/number}","contents_url":"https://api.github.com/repos/Doist/TodoistPojos/contents/{+path}","compare_url":"https://api.github.com/repos/Doist/TodoistPojos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Doist/TodoistPojos/merges","archive_url":"https://api.github.com/repos/Doist/TodoistPojos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Doist/TodoistPojos/downloads","issues_url":"https://api.github.com/repos/Doist/TodoistPojos/issues{/number}","pulls_url":"https://api.github.com/repos/Doist/TodoistPojos/pulls{/number}","milestones_url":"https://api.github.com/repos/Doist/TodoistPojos/milestones{/number}","notifications_url":"https://api.github.com/repos/Doist/TodoistPojos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Doist/TodoistPojos/labels{/name}","releases_url":"https://api.github.com/repos/Doist/TodoistPojos/releases{/id}","deployments_url":"https://api.github.com/repos/Doist/TodoistPojos/deployments","created_at":"2014-09-01T16:37:16Z","updated_at":"2016-11-11T16:20:28Z","pushed_at":"2016-12-20T18:51:41Z","git_url":"git://github.com/Doist/TodoistPojos.git","ssh_url":"git@github.com:Doist/TodoistPojos.git","clone_url":"https://github.com/Doist/TodoistPojos.git","svn_url":"https://github.com/Doist/TodoistPojos","homepage":"","size":126,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Doist/TodoistPojos/pulls/6"},"html":{"href":"https://github.com/Doist/TodoistPojos/pull/6"},"issue":{"href":"https://api.github.com/repos/Doist/TodoistPojos/issues/6"},"comments":{"href":"https://api.github.com/repos/Doist/TodoistPojos/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/Doist/TodoistPojos/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/Doist/TodoistPojos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Doist/TodoistPojos/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/Doist/TodoistPojos/statuses/d6d492e05c7ee22715dc096fb34bd76512b43a4f"}}}}
{"actor":{"display_login":"goncalossilva"}}