{"action":"closed","issue":{"url":"https://api.github.com/repos/DotNetAnalyzers/IDisposableAnalyzers/issues/43","repository_url":"https://api.github.com/repos/DotNetAnalyzers/IDisposableAnalyzers","labels_url":"https://api.github.com/repos/DotNetAnalyzers/IDisposableAnalyzers/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/DotNetAnalyzers/IDisposableAnalyzers/issues/43/comments","events_url":"https://api.github.com/repos/DotNetAnalyzers/IDisposableAnalyzers/issues/43/events","html_url":"https://github.com/DotNetAnalyzers/IDisposableAnalyzers/issues/43","id":293480971,"number":43,"title":"IDISP003 Asks to dispose null object","user":{"login":"fahadabdulaziz","id":5483584,"avatar_url":"https://avatars2.githubusercontent.com/u/5483584?v=4","gravatar_id":"","url":"https://api.github.com/users/fahadabdulaziz","html_url":"https://github.com/fahadabdulaziz","followers_url":"https://api.github.com/users/fahadabdulaziz/followers","following_url":"https://api.github.com/users/fahadabdulaziz/following{/other_user}","gists_url":"https://api.github.com/users/fahadabdulaziz/gists{/gist_id}","starred_url":"https://api.github.com/users/fahadabdulaziz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fahadabdulaziz/subscriptions","organizations_url":"https://api.github.com/users/fahadabdulaziz/orgs","repos_url":"https://api.github.com/users/fahadabdulaziz/repos","events_url":"https://api.github.com/users/fahadabdulaziz/events{/privacy}","received_events_url":"https://api.github.com/users/fahadabdulaziz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-01T10:39:01Z","updated_at":"2018-02-19T08:04:50Z","closed_at":"2018-02-19T08:04:50Z","author_association":"NONE","body":"First thank you for the great work you done and still doing, these analyzers really helps.\r\n\r\nThere is an issue that analyzer IDISP003 asks to dispose a null object before re-assigning it:\r\n![screenshot_1](https://user-images.githubusercontent.com/5483584/35674164-d3695654-0754-11e8-8e5a-da942d47b7e6.png)\r\n\r\n```csharp\r\npublic class Test\r\n{\r\n   private SomeObject newObject; // This object is null\r\n   \r\n   public Init()\r\n   {\r\n      if(SomeObject == null)\r\n      newObject = new SomeObject() // Analyzer will falsely report wrong here\r\n   }\r\n}\r\n```"}}
{"actor":{"display_login":"JohanLarsson"}}