{"action":"created","comment":{"url":"https://api.github.com/repos/pusher/pusher-websocket-java/pulls/comments/41252168","id":41252168,"diff_hunk":"@@ -55,12 +57,13 @@ public void bind(final String eventName, final SubscriptionEventListener listene\n         validateArguments(eventName, listener);\n \n         Set<SubscriptionEventListener> listeners = eventNameToListenerMap.get(eventName);\n-        if (listeners == null) {\n-            listeners = new HashSet<SubscriptionEventListener>();\n-            eventNameToListenerMap.put(eventName, listeners);\n+        synchronized (lock) {\n+            if (listeners == null) {\n+                listeners = new HashSet<SubscriptionEventListener>();\n+                  eventNameToListenerMap.put(eventName, listeners);","path":"src/main/java/com/pusher/client/channel/impl/ChannelImpl.java","position":25,"original_position":25,"commit_id":"aeeb62a023cb2d617f3b396a95f839f65072b040","original_commit_id":"aeeb62a023cb2d617f3b396a95f839f65072b040","user":{"login":"mdpye","id":404825,"avatar_url":"https://avatars.githubusercontent.com/u/404825?v=3","gravatar_id":"","url":"https://api.github.com/users/mdpye","html_url":"https://github.com/mdpye","followers_url":"https://api.github.com/users/mdpye/followers","following_url":"https://api.github.com/users/mdpye/following{/other_user}","gists_url":"https://api.github.com/users/mdpye/gists{/gist_id}","starred_url":"https://api.github.com/users/mdpye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdpye/subscriptions","organizations_url":"https://api.github.com/users/mdpye/orgs","repos_url":"https://api.github.com/users/mdpye/repos","events_url":"https://api.github.com/users/mdpye/events{/privacy}","received_events_url":"https://api.github.com/users/mdpye/received_events","type":"User","site_admin":false},"body":"2 space indentation?","created_at":"2015-10-06T11:23:25Z","updated_at":"2015-10-06T11:23:25Z","html_url":"https://github.com/pusher/pusher-websocket-java/pull/79#discussion_r41252168","pull_request_url":"https://api.github.com/repos/pusher/pusher-websocket-java/pulls/79","_links":{"self":{"href":"https://api.github.com/repos/pusher/pusher-websocket-java/pulls/comments/41252168"},"html":{"href":"https://github.com/pusher/pusher-websocket-java/pull/79#discussion_r41252168"},"pull_request":{"href":"https://api.github.com/repos/pusher/pusher-websocket-java/pulls/79"}}},"pull_request":{"url":"https://api.github.com/repos/pusher/pusher-websocket-java/pulls/79","id":46886417,"html_url":"https://github.com/pusher/pusher-websocket-java/pull/79","diff_url":"https://github.com/pusher/pusher-websocket-java/pull/79.diff","patch_url":"https://github.com/pusher/pusher-websocket-java/pull/79.patch","issue_url":"https://api.github.com/repos/pusher/pusher-websocket-java/issues/79","number":79,"state":"open","locked":false,"title":"Fix binding unbinding concurrent modification","user":{"login":"jpatel531","id":7556206,"avatar_url":"https://avatars.githubusercontent.com/u/7556206?v=3","gravatar_id":"","url":"https://api.github.com/users/jpatel531","html_url":"https://github.com/jpatel531","followers_url":"https://api.github.com/users/jpatel531/followers","following_url":"https://api.github.com/users/jpatel531/following{/other_user}","gists_url":"https://api.github.com/users/jpatel531/gists{/gist_id}","starred_url":"https://api.github.com/users/jpatel531/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpatel531/subscriptions","organizations_url":"https://api.github.com/users/jpatel531/orgs","repos_url":"https://api.github.com/users/jpatel531/repos","events_url":"https://api.github.com/users/jpatel531/events{/privacy}","received_events_url":"https://api.github.com/users/jpatel531/received_events","type":"User","site_admin":false},"body":"Following on from #71 \r\n\r\nLocking around both the `eventNameToListenerMap` and `listeners` HashSet. ","created_at":"2015-10-06T10:37:19Z","updated_at":"2015-10-06T11:23:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c45616213a97ae5e6a4b05ceabcb1aa4360cc995","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pusher/pusher-websocket-java/pulls/79/commits","review_comments_url":"https://api.github.com/repos/pusher/pusher-websocket-java/pulls/79/comments","review_comment_url":"https://api.github.com/repos/pusher/pusher-websocket-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pusher/pusher-websocket-java/issues/79/comments","statuses_url":"https://api.github.com/repos/pusher/pusher-websocket-java/statuses/aeeb62a023cb2d617f3b396a95f839f65072b040","head":{"label":"pusher:fix-binding-unbinding-concurrent-modification","ref":"fix-binding-unbinding-concurrent-modification","sha":"aeeb62a023cb2d617f3b396a95f839f65072b040","user":{"login":"pusher","id":739550,"avatar_url":"https://avatars.githubusercontent.com/u/739550?v=3","gravatar_id":"","url":"https://api.github.com/users/pusher","html_url":"https://github.com/pusher","followers_url":"https://api.github.com/users/pusher/followers","following_url":"https://api.github.com/users/pusher/following{/other_user}","gists_url":"https://api.github.com/users/pusher/gists{/gist_id}","starred_url":"https://api.github.com/users/pusher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pusher/subscriptions","organizations_url":"https://api.github.com/users/pusher/orgs","repos_url":"https://api.github.com/users/pusher/repos","events_url":"https://api.github.com/users/pusher/events{/privacy}","received_events_url":"https://api.github.com/users/pusher/received_events","type":"Organization","site_admin":false},"repo":{"id":9348465,"name":"pusher-websocket-java","full_name":"pusher/pusher-websocket-java","owner":{"login":"pusher","id":739550,"avatar_url":"https://avatars.githubusercontent.com/u/739550?v=3","gravatar_id":"","url":"https://api.github.com/users/pusher","html_url":"https://github.com/pusher","followers_url":"https://api.github.com/users/pusher/followers","following_url":"https://api.github.com/users/pusher/following{/other_user}","gists_url":"https://api.github.com/users/pusher/gists{/gist_id}","starred_url":"https://api.github.com/users/pusher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pusher/subscriptions","organizations_url":"https://api.github.com/users/pusher/orgs","repos_url":"https://api.github.com/users/pusher/repos","events_url":"https://api.github.com/users/pusher/events{/privacy}","received_events_url":"https://api.github.com/users/pusher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pusher/pusher-websocket-java","description":"Pusher client library for Java targeting general Java and Android.","fork":false,"url":"https://api.github.com/repos/pusher/pusher-websocket-java","forks_url":"https://api.github.com/repos/pusher/pusher-websocket-java/forks","keys_url":"https://api.github.com/repos/pusher/pusher-websocket-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pusher/pusher-websocket-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pusher/pusher-websocket-java/teams","hooks_url":"https://api.github.com/repos/pusher/pusher-websocket-java/hooks","issue_events_url":"https://api.github.com/repos/pusher/pusher-websocket-java/issues/events{/number}","events_url":"https://api.github.com/repos/pusher/pusher-websocket-java/events","assignees_url":"https://api.github.com/repos/pusher/pusher-websocket-java/assignees{/user}","branches_url":"https://api.github.com/repos/pusher/pusher-websocket-java/branches{/branch}","tags_url":"https://api.github.com/repos/pusher/pusher-websocket-java/tags","blobs_url":"https://api.github.com/repos/pusher/pusher-websocket-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pusher/pusher-websocket-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pusher/pusher-websocket-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/pusher/pusher-websocket-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pusher/pusher-websocket-java/statuses/{sha}","languages_url":"https://api.github.com/repos/pusher/pusher-websocket-java/languages","stargazers_url":"https://api.github.com/repos/pusher/pusher-websocket-java/stargazers","contributors_url":"https://api.github.com/repos/pusher/pusher-websocket-java/contributors","subscribers_url":"https://api.github.com/repos/pusher/pusher-websocket-java/subscribers","subscription_url":"https://api.github.com/repos/pusher/pusher-websocket-java/subscription","commits_url":"https://api.github.com/repos/pusher/pusher-websocket-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/pusher/pusher-websocket-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/pusher/pusher-websocket-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/pusher/pusher-websocket-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/pusher/pusher-websocket-java/contents/{+path}","compare_url":"https://api.github.com/repos/pusher/pusher-websocket-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pusher/pusher-websocket-java/merges","archive_url":"https://api.github.com/repos/pusher/pusher-websocket-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pusher/pusher-websocket-java/downloads","issues_url":"https://api.github.com/repos/pusher/pusher-websocket-java/issues{/number}","pulls_url":"https://api.github.com/repos/pusher/pusher-websocket-java/pulls{/number}","milestones_url":"https://api.github.com/repos/pusher/pusher-websocket-java/milestones{/number}","notifications_url":"https://api.github.com/repos/pusher/pusher-websocket-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pusher/pusher-websocket-java/labels{/name}","releases_url":"https://api.github.com/repos/pusher/pusher-websocket-java/releases{/id}","created_at":"2013-04-10T14:50:41Z","updated_at":"2015-09-24T21:31:25Z","pushed_at":"2015-10-06T10:37:20Z","git_url":"git://github.com/pusher/pusher-websocket-java.git","ssh_url":"git@github.com:pusher/pusher-websocket-java.git","clone_url":"https://github.com/pusher/pusher-websocket-java.git","svn_url":"https://github.com/pusher/pusher-websocket-java","homepage":null,"size":4010,"stargazers_count":74,"watchers_count":74,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":50,"mirror_url":null,"open_issues_count":17,"forks":50,"open_issues":17,"watchers":74,"default_branch":"master"}},"base":{"label":"pusher:master","ref":"master","sha":"e7518a0c545e6e5364ebc30d5d27de0746fbc35b","user":{"login":"pusher","id":739550,"avatar_url":"https://avatars.githubusercontent.com/u/739550?v=3","gravatar_id":"","url":"https://api.github.com/users/pusher","html_url":"https://github.com/pusher","followers_url":"https://api.github.com/users/pusher/followers","following_url":"https://api.github.com/users/pusher/following{/other_user}","gists_url":"https://api.github.com/users/pusher/gists{/gist_id}","starred_url":"https://api.github.com/users/pusher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pusher/subscriptions","organizations_url":"https://api.github.com/users/pusher/orgs","repos_url":"https://api.github.com/users/pusher/repos","events_url":"https://api.github.com/users/pusher/events{/privacy}","received_events_url":"https://api.github.com/users/pusher/received_events","type":"Organization","site_admin":false},"repo":{"id":9348465,"name":"pusher-websocket-java","full_name":"pusher/pusher-websocket-java","owner":{"login":"pusher","id":739550,"avatar_url":"https://avatars.githubusercontent.com/u/739550?v=3","gravatar_id":"","url":"https://api.github.com/users/pusher","html_url":"https://github.com/pusher","followers_url":"https://api.github.com/users/pusher/followers","following_url":"https://api.github.com/users/pusher/following{/other_user}","gists_url":"https://api.github.com/users/pusher/gists{/gist_id}","starred_url":"https://api.github.com/users/pusher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pusher/subscriptions","organizations_url":"https://api.github.com/users/pusher/orgs","repos_url":"https://api.github.com/users/pusher/repos","events_url":"https://api.github.com/users/pusher/events{/privacy}","received_events_url":"https://api.github.com/users/pusher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pusher/pusher-websocket-java","description":"Pusher client library for Java targeting general Java and Android.","fork":false,"url":"https://api.github.com/repos/pusher/pusher-websocket-java","forks_url":"https://api.github.com/repos/pusher/pusher-websocket-java/forks","keys_url":"https://api.github.com/repos/pusher/pusher-websocket-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pusher/pusher-websocket-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pusher/pusher-websocket-java/teams","hooks_url":"https://api.github.com/repos/pusher/pusher-websocket-java/hooks","issue_events_url":"https://api.github.com/repos/pusher/pusher-websocket-java/issues/events{/number}","events_url":"https://api.github.com/repos/pusher/pusher-websocket-java/events","assignees_url":"https://api.github.com/repos/pusher/pusher-websocket-java/assignees{/user}","branches_url":"https://api.github.com/repos/pusher/pusher-websocket-java/branches{/branch}","tags_url":"https://api.github.com/repos/pusher/pusher-websocket-java/tags","blobs_url":"https://api.github.com/repos/pusher/pusher-websocket-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pusher/pusher-websocket-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pusher/pusher-websocket-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/pusher/pusher-websocket-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pusher/pusher-websocket-java/statuses/{sha}","languages_url":"https://api.github.com/repos/pusher/pusher-websocket-java/languages","stargazers_url":"https://api.github.com/repos/pusher/pusher-websocket-java/stargazers","contributors_url":"https://api.github.com/repos/pusher/pusher-websocket-java/contributors","subscribers_url":"https://api.github.com/repos/pusher/pusher-websocket-java/subscribers","subscription_url":"https://api.github.com/repos/pusher/pusher-websocket-java/subscription","commits_url":"https://api.github.com/repos/pusher/pusher-websocket-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/pusher/pusher-websocket-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/pusher/pusher-websocket-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/pusher/pusher-websocket-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/pusher/pusher-websocket-java/contents/{+path}","compare_url":"https://api.github.com/repos/pusher/pusher-websocket-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pusher/pusher-websocket-java/merges","archive_url":"https://api.github.com/repos/pusher/pusher-websocket-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pusher/pusher-websocket-java/downloads","issues_url":"https://api.github.com/repos/pusher/pusher-websocket-java/issues{/number}","pulls_url":"https://api.github.com/repos/pusher/pusher-websocket-java/pulls{/number}","milestones_url":"https://api.github.com/repos/pusher/pusher-websocket-java/milestones{/number}","notifications_url":"https://api.github.com/repos/pusher/pusher-websocket-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pusher/pusher-websocket-java/labels{/name}","releases_url":"https://api.github.com/repos/pusher/pusher-websocket-java/releases{/id}","created_at":"2013-04-10T14:50:41Z","updated_at":"2015-09-24T21:31:25Z","pushed_at":"2015-10-06T10:37:20Z","git_url":"git://github.com/pusher/pusher-websocket-java.git","ssh_url":"git@github.com:pusher/pusher-websocket-java.git","clone_url":"https://github.com/pusher/pusher-websocket-java.git","svn_url":"https://github.com/pusher/pusher-websocket-java","homepage":null,"size":4010,"stargazers_count":74,"watchers_count":74,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":50,"mirror_url":null,"open_issues_count":17,"forks":50,"open_issues":17,"watchers":74,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pusher/pusher-websocket-java/pulls/79"},"html":{"href":"https://github.com/pusher/pusher-websocket-java/pull/79"},"issue":{"href":"https://api.github.com/repos/pusher/pusher-websocket-java/issues/79"},"comments":{"href":"https://api.github.com/repos/pusher/pusher-websocket-java/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/pusher/pusher-websocket-java/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/pusher/pusher-websocket-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pusher/pusher-websocket-java/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/pusher/pusher-websocket-java/statuses/aeeb62a023cb2d617f3b396a95f839f65072b040"}}}}