{"action":"created","comment":{"url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/pulls/comments/32198927","id":32198927,"diff_hunk":"@@ -0,0 +1,31 @@\n+<p>\n+    Locking on the current object instance (i.e. <code>this</code>), or on a <code>Type</code> object is a bad idea because \n+    any other thread could acquire (or attempt to acquire) the same lock for another unrelated purpose, thus creating deadlocks.","path":"src/CSharp.CodeAnalysis/Rules.Description/S2551.html","position":3,"original_position":3,"commit_id":"ce858110c7663ad89fc85a8ea4e90e0558d1a578","original_commit_id":"ce858110c7663ad89fc85a8ea4e90e0558d1a578","user":{"login":"dbolkensteyn","id":1132601,"avatar_url":"https://avatars.githubusercontent.com/u/1132601?v=3","gravatar_id":"","url":"https://api.github.com/users/dbolkensteyn","html_url":"https://github.com/dbolkensteyn","followers_url":"https://api.github.com/users/dbolkensteyn/followers","following_url":"https://api.github.com/users/dbolkensteyn/following{/other_user}","gists_url":"https://api.github.com/users/dbolkensteyn/gists{/gist_id}","starred_url":"https://api.github.com/users/dbolkensteyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbolkensteyn/subscriptions","organizations_url":"https://api.github.com/users/dbolkensteyn/orgs","repos_url":"https://api.github.com/users/dbolkensteyn/repos","events_url":"https://api.github.com/users/dbolkensteyn/events{/privacy}","received_events_url":"https://api.github.com/users/dbolkensteyn/received_events","type":"User","site_admin":false},"body":"@tvsonar please explain me how this creates a deadlock","created_at":"2015-06-11T08:24:37Z","updated_at":"2015-06-11T08:24:37Z","html_url":"https://github.com/SonarSource/sonar-dotnet-codeanalysis/pull/24#discussion_r32198927","pull_request_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/pulls/comments/32198927"},"html":{"href":"https://github.com/SonarSource/sonar-dotnet-codeanalysis/pull/24#discussion_r32198927"},"pull_request":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/pulls/24","id":37253512,"html_url":"https://github.com/SonarSource/sonar-dotnet-codeanalysis/pull/24","diff_url":"https://github.com/SonarSource/sonar-dotnet-codeanalysis/pull/24.diff","patch_url":"https://github.com/SonarSource/sonar-dotnet-codeanalysis/pull/24.patch","issue_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/issues/24","number":24,"state":"open","locked":false,"title":"SONARCSANA-114 Types and \"this\" should not be used for locking","user":{"login":"tvsonar","id":11485373,"avatar_url":"https://avatars.githubusercontent.com/u/11485373?v=3","gravatar_id":"","url":"https://api.github.com/users/tvsonar","html_url":"https://github.com/tvsonar","followers_url":"https://api.github.com/users/tvsonar/followers","following_url":"https://api.github.com/users/tvsonar/following{/other_user}","gists_url":"https://api.github.com/users/tvsonar/gists{/gist_id}","starred_url":"https://api.github.com/users/tvsonar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tvsonar/subscriptions","organizations_url":"https://api.github.com/users/tvsonar/orgs","repos_url":"https://api.github.com/users/tvsonar/repos","events_url":"https://api.github.com/users/tvsonar/events{/privacy}","received_events_url":"https://api.github.com/users/tvsonar/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-09T13:36:34Z","updated_at":"2015-06-11T08:24:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7e948acd1fa38bfea7e968b1fa9dff2d75922c9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/pulls/24/commits","review_comments_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/pulls/24/comments","review_comment_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/issues/24/comments","statuses_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/statuses/ce858110c7663ad89fc85a8ea4e90e0558d1a578","head":{"label":"tvsonar:locking-bad","ref":"locking-bad","sha":"ce858110c7663ad89fc85a8ea4e90e0558d1a578","user":{"login":"tvsonar","id":11485373,"avatar_url":"https://avatars.githubusercontent.com/u/11485373?v=3","gravatar_id":"","url":"https://api.github.com/users/tvsonar","html_url":"https://github.com/tvsonar","followers_url":"https://api.github.com/users/tvsonar/followers","following_url":"https://api.github.com/users/tvsonar/following{/other_user}","gists_url":"https://api.github.com/users/tvsonar/gists{/gist_id}","starred_url":"https://api.github.com/users/tvsonar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tvsonar/subscriptions","organizations_url":"https://api.github.com/users/tvsonar/orgs","repos_url":"https://api.github.com/users/tvsonar/repos","events_url":"https://api.github.com/users/tvsonar/events{/privacy}","received_events_url":"https://api.github.com/users/tvsonar/received_events","type":"User","site_admin":false},"repo":{"id":35810200,"name":"sonar-dotnet-codeanalysis","full_name":"tvsonar/sonar-dotnet-codeanalysis","owner":{"login":"tvsonar","id":11485373,"avatar_url":"https://avatars.githubusercontent.com/u/11485373?v=3","gravatar_id":"","url":"https://api.github.com/users/tvsonar","html_url":"https://github.com/tvsonar","followers_url":"https://api.github.com/users/tvsonar/followers","following_url":"https://api.github.com/users/tvsonar/following{/other_user}","gists_url":"https://api.github.com/users/tvsonar/gists{/gist_id}","starred_url":"https://api.github.com/users/tvsonar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tvsonar/subscriptions","organizations_url":"https://api.github.com/users/tvsonar/orgs","repos_url":"https://api.github.com/users/tvsonar/repos","events_url":"https://api.github.com/users/tvsonar/events{/privacy}","received_events_url":"https://api.github.com/users/tvsonar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tvsonar/sonar-dotnet-codeanalysis","description":"","fork":true,"url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis","forks_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/forks","keys_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/teams","hooks_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/hooks","issue_events_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/issues/events{/number}","events_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/events","assignees_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/assignees{/user}","branches_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/branches{/branch}","tags_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/tags","blobs_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/git/refs{/sha}","trees_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/statuses/{sha}","languages_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/languages","stargazers_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/stargazers","contributors_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/contributors","subscribers_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/subscribers","subscription_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/subscription","commits_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/commits{/sha}","git_commits_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/git/commits{/sha}","comments_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/comments{/number}","issue_comment_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/issues/comments{/number}","contents_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/contents/{+path}","compare_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/merges","archive_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/downloads","issues_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/issues{/number}","pulls_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/pulls{/number}","milestones_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/milestones{/number}","notifications_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/labels{/name}","releases_url":"https://api.github.com/repos/tvsonar/sonar-dotnet-codeanalysis/releases{/id}","created_at":"2015-05-18T09:55:28Z","updated_at":"2015-05-18T09:55:30Z","pushed_at":"2015-06-10T06:28:13Z","git_url":"git://github.com/tvsonar/sonar-dotnet-codeanalysis.git","ssh_url":"git@github.com:tvsonar/sonar-dotnet-codeanalysis.git","clone_url":"https://github.com/tvsonar/sonar-dotnet-codeanalysis.git","svn_url":"https://github.com/tvsonar/sonar-dotnet-codeanalysis","homepage":null,"size":28359,"stargazers_count":0,"watchers_count":0,"language":"C#","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":"master"}},"base":{"label":"SonarSource:master","ref":"master","sha":"df026f3f4c75bd350efc1839081a90b0f88f60b1","user":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":33920958,"name":"sonar-dotnet-codeanalysis","full_name":"SonarSource/sonar-dotnet-codeanalysis","owner":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarSource/sonar-dotnet-codeanalysis","description":"","fork":false,"url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis","forks_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/forks","keys_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/events","assignees_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/merges","archive_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/releases{/id}","created_at":"2015-04-14T08:51:34Z","updated_at":"2015-05-08T15:30:34Z","pushed_at":"2015-06-10T08:52:48Z","git_url":"git://github.com/SonarSource/sonar-dotnet-codeanalysis.git","ssh_url":"git@github.com:SonarSource/sonar-dotnet-codeanalysis.git","clone_url":"https://github.com/SonarSource/sonar-dotnet-codeanalysis.git","svn_url":"https://github.com/SonarSource/sonar-dotnet-codeanalysis","homepage":null,"size":29456,"stargazers_count":5,"watchers_count":5,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/pulls/24"},"html":{"href":"https://github.com/SonarSource/sonar-dotnet-codeanalysis/pull/24"},"issue":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/issues/24"},"comments":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-codeanalysis/statuses/ce858110c7663ad89fc85a8ea4e90e0558d1a578"}}}}