{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-geode/pulls/comments/90077848","pull_request_review_id":10602752,"id":90077848,"diff_hunk":"@@ -50,36 +50,26 @@ public StatMonitorHandler() {\n \n   /** Adds a monitor which will be notified of samples */\n   public boolean addMonitor(StatisticsMonitor monitor) {\n-    synchronized (this) {\n-      boolean added = false;\n-      List<StatisticsMonitor> oldMonitors = this.monitors;\n-      if (!oldMonitors.contains(monitor)) {\n-        List<StatisticsMonitor> newMonitors = new ArrayList<StatisticsMonitor>(oldMonitors);\n-        added = newMonitors.add(monitor);\n-        this.monitors = Collections.unmodifiableList(newMonitors);\n-      }\n-      if (!this.monitors.isEmpty()) {\n-        startNotifier_IfEnabledAndNotRunning();\n-      }\n-      return added;\n+    boolean added = false;\n+    if (!this.monitors.contains(monitor)) {\n+      added = this.monitors.add(monitor);\n+    }\n+    if (!this.monitors.isEmpty()) {\n+      startNotifier_IfEnabledAndNotRunning();\n     }\n+    return added;\n   }\n \n   /** Removes a monitor that will no longer be used */\n   public boolean removeMonitor(StatisticsMonitor monitor) {\n-    synchronized (this) {\n-      boolean removed = false;\n-      List<StatisticsMonitor> oldMonitors = this.monitors;\n-      if (oldMonitors.contains(monitor)) {\n-        List<StatisticsMonitor> newMonitors = new ArrayList<StatisticsMonitor>(oldMonitors);\n-        removed = newMonitors.remove(monitor);\n-        this.monitors = Collections.unmodifiableList(newMonitors);\n-      }\n-      if (this.monitors.isEmpty()) {\n-        stopNotifier_IfEnabledAndRunning();\n-      }\n-      return removed;\n+    boolean removed = false;","path":"geode-core/src/main/java/org/apache/geode/internal/statistics/StatMonitorHandler.java","position":64,"original_position":64,"commit_id":"4a33decaae06a0cb2e2e9677359c152ac7ccc43b","original_commit_id":"4a33decaae06a0cb2e2e9677359c152ac7ccc43b","user":{"login":"upthewaterspout","id":857521,"avatar_url":"https://avatars.githubusercontent.com/u/857521?v=3","gravatar_id":"","url":"https://api.github.com/users/upthewaterspout","html_url":"https://github.com/upthewaterspout","followers_url":"https://api.github.com/users/upthewaterspout/followers","following_url":"https://api.github.com/users/upthewaterspout/following{/other_user}","gists_url":"https://api.github.com/users/upthewaterspout/gists{/gist_id}","starred_url":"https://api.github.com/users/upthewaterspout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/upthewaterspout/subscriptions","organizations_url":"https://api.github.com/users/upthewaterspout/orgs","repos_url":"https://api.github.com/users/upthewaterspout/repos","events_url":"https://api.github.com/users/upthewaterspout/events{/privacy}","received_events_url":"https://api.github.com/users/upthewaterspout/received_events","type":"User","site_admin":false},"body":"Same issue here - it's not safe to remove the synchronization.","created_at":"2016-11-29T18:45:40Z","updated_at":"2016-11-29T18:45:40Z","html_url":"https://github.com/apache/incubator-geode/pull/299#discussion_r90077848","pull_request_url":"https://api.github.com/repos/apache/incubator-geode/pulls/299","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-geode/pulls/comments/90077848"},"html":{"href":"https://github.com/apache/incubator-geode/pull/299#discussion_r90077848"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-geode/pulls/299"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-geode/pulls/299","id":95656330,"html_url":"https://github.com/apache/incubator-geode/pull/299","diff_url":"https://github.com/apache/incubator-geode/pull/299.diff","patch_url":"https://github.com/apache/incubator-geode/pull/299.patch","issue_url":"https://api.github.com/repos/apache/incubator-geode/issues/299","number":299,"state":"open","locked":false,"title":"[ GEODE-2141 ] #comment Fix Issue #2141","user":{"login":"davinash","id":338946,"avatar_url":"https://avatars.githubusercontent.com/u/338946?v=3","gravatar_id":"","url":"https://api.github.com/users/davinash","html_url":"https://github.com/davinash","followers_url":"https://api.github.com/users/davinash/followers","following_url":"https://api.github.com/users/davinash/following{/other_user}","gists_url":"https://api.github.com/users/davinash/gists{/gist_id}","starred_url":"https://api.github.com/users/davinash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davinash/subscriptions","organizations_url":"https://api.github.com/users/davinash/orgs","repos_url":"https://api.github.com/users/davinash/repos","events_url":"https://api.github.com/users/davinash/events{/privacy}","received_events_url":"https://api.github.com/users/davinash/received_events","type":"User","site_admin":false},"body":"Replaced List with ConcurrentHashSet","created_at":"2016-11-29T09:40:40Z","updated_at":"2016-11-29T18:49:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e9715df3f74e61592965f5eb4946a9a54fd80668","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-geode/pulls/299/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-geode/pulls/299/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-geode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-geode/issues/299/comments","statuses_url":"https://api.github.com/repos/apache/incubator-geode/statuses/4a33decaae06a0cb2e2e9677359c152ac7ccc43b","head":{"label":"davinash:feature/GEODE-2141","ref":"feature/GEODE-2141","sha":"4a33decaae06a0cb2e2e9677359c152ac7ccc43b","user":{"login":"davinash","id":338946,"avatar_url":"https://avatars.githubusercontent.com/u/338946?v=3","gravatar_id":"","url":"https://api.github.com/users/davinash","html_url":"https://github.com/davinash","followers_url":"https://api.github.com/users/davinash/followers","following_url":"https://api.github.com/users/davinash/following{/other_user}","gists_url":"https://api.github.com/users/davinash/gists{/gist_id}","starred_url":"https://api.github.com/users/davinash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davinash/subscriptions","organizations_url":"https://api.github.com/users/davinash/orgs","repos_url":"https://api.github.com/users/davinash/repos","events_url":"https://api.github.com/users/davinash/events{/privacy}","received_events_url":"https://api.github.com/users/davinash/received_events","type":"User","site_admin":false},"repo":{"id":74809486,"name":"incubator-geode","full_name":"davinash/incubator-geode","owner":{"login":"davinash","id":338946,"avatar_url":"https://avatars.githubusercontent.com/u/338946?v=3","gravatar_id":"","url":"https://api.github.com/users/davinash","html_url":"https://github.com/davinash","followers_url":"https://api.github.com/users/davinash/followers","following_url":"https://api.github.com/users/davinash/following{/other_user}","gists_url":"https://api.github.com/users/davinash/gists{/gist_id}","starred_url":"https://api.github.com/users/davinash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davinash/subscriptions","organizations_url":"https://api.github.com/users/davinash/orgs","repos_url":"https://api.github.com/users/davinash/repos","events_url":"https://api.github.com/users/davinash/events{/privacy}","received_events_url":"https://api.github.com/users/davinash/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davinash/incubator-geode","description":"Mirror of Apache Geode (Incubating)","fork":true,"url":"https://api.github.com/repos/davinash/incubator-geode","forks_url":"https://api.github.com/repos/davinash/incubator-geode/forks","keys_url":"https://api.github.com/repos/davinash/incubator-geode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davinash/incubator-geode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davinash/incubator-geode/teams","hooks_url":"https://api.github.com/repos/davinash/incubator-geode/hooks","issue_events_url":"https://api.github.com/repos/davinash/incubator-geode/issues/events{/number}","events_url":"https://api.github.com/repos/davinash/incubator-geode/events","assignees_url":"https://api.github.com/repos/davinash/incubator-geode/assignees{/user}","branches_url":"https://api.github.com/repos/davinash/incubator-geode/branches{/branch}","tags_url":"https://api.github.com/repos/davinash/incubator-geode/tags","blobs_url":"https://api.github.com/repos/davinash/incubator-geode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davinash/incubator-geode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davinash/incubator-geode/git/refs{/sha}","trees_url":"https://api.github.com/repos/davinash/incubator-geode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davinash/incubator-geode/statuses/{sha}","languages_url":"https://api.github.com/repos/davinash/incubator-geode/languages","stargazers_url":"https://api.github.com/repos/davinash/incubator-geode/stargazers","contributors_url":"https://api.github.com/repos/davinash/incubator-geode/contributors","subscribers_url":"https://api.github.com/repos/davinash/incubator-geode/subscribers","subscription_url":"https://api.github.com/repos/davinash/incubator-geode/subscription","commits_url":"https://api.github.com/repos/davinash/incubator-geode/commits{/sha}","git_commits_url":"https://api.github.com/repos/davinash/incubator-geode/git/commits{/sha}","comments_url":"https://api.github.com/repos/davinash/incubator-geode/comments{/number}","issue_comment_url":"https://api.github.com/repos/davinash/incubator-geode/issues/comments{/number}","contents_url":"https://api.github.com/repos/davinash/incubator-geode/contents/{+path}","compare_url":"https://api.github.com/repos/davinash/incubator-geode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davinash/incubator-geode/merges","archive_url":"https://api.github.com/repos/davinash/incubator-geode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davinash/incubator-geode/downloads","issues_url":"https://api.github.com/repos/davinash/incubator-geode/issues{/number}","pulls_url":"https://api.github.com/repos/davinash/incubator-geode/pulls{/number}","milestones_url":"https://api.github.com/repos/davinash/incubator-geode/milestones{/number}","notifications_url":"https://api.github.com/repos/davinash/incubator-geode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davinash/incubator-geode/labels{/name}","releases_url":"https://api.github.com/repos/davinash/incubator-geode/releases{/id}","deployments_url":"https://api.github.com/repos/davinash/incubator-geode/deployments","created_at":"2016-11-26T06:39:56Z","updated_at":"2016-11-26T06:40:09Z","pushed_at":"2016-11-29T15:53:09Z","git_url":"git://github.com/davinash/incubator-geode.git","ssh_url":"git@github.com:davinash/incubator-geode.git","clone_url":"https://github.com/davinash/incubator-geode.git","svn_url":"https://github.com/davinash/incubator-geode","homepage":null,"size":118244,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"apache:develop","ref":"develop","sha":"440e16504a68fc475fb4c7aabe0e4c3941087c12","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":34839383,"name":"incubator-geode","full_name":"apache/incubator-geode","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-geode","description":"Mirror of Apache Geode (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-geode","forks_url":"https://api.github.com/repos/apache/incubator-geode/forks","keys_url":"https://api.github.com/repos/apache/incubator-geode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-geode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-geode/teams","hooks_url":"https://api.github.com/repos/apache/incubator-geode/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-geode/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-geode/events","assignees_url":"https://api.github.com/repos/apache/incubator-geode/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-geode/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-geode/tags","blobs_url":"https://api.github.com/repos/apache/incubator-geode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-geode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-geode/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-geode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-geode/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-geode/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-geode/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-geode/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-geode/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-geode/subscription","commits_url":"https://api.github.com/repos/apache/incubator-geode/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-geode/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-geode/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-geode/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-geode/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-geode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-geode/merges","archive_url":"https://api.github.com/repos/apache/incubator-geode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-geode/downloads","issues_url":"https://api.github.com/repos/apache/incubator-geode/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-geode/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-geode/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-geode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-geode/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-geode/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-geode/deployments","created_at":"2015-04-30T07:00:05Z","updated_at":"2016-11-29T11:32:40Z","pushed_at":"2016-11-29T18:24:46Z","git_url":"git://github.com/apache/incubator-geode.git","ssh_url":"git@github.com:apache/incubator-geode.git","clone_url":"https://github.com/apache/incubator-geode.git","svn_url":"https://github.com/apache/incubator-geode","homepage":null,"size":130582,"stargazers_count":718,"watchers_count":718,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":274,"mirror_url":"git://git.apache.org/incubator-geode.git","open_issues_count":11,"forks":274,"open_issues":11,"watchers":718,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-geode/pulls/299"},"html":{"href":"https://github.com/apache/incubator-geode/pull/299"},"issue":{"href":"https://api.github.com/repos/apache/incubator-geode/issues/299"},"comments":{"href":"https://api.github.com/repos/apache/incubator-geode/issues/299/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-geode/pulls/299/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-geode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-geode/pulls/299/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-geode/statuses/4a33decaae06a0cb2e2e9677359c152ac7ccc43b"}}}}
{"actor":{"display_login":"upthewaterspout"}}