{"action":"created","issue":{"url":"https://api.github.com/repos/ServiceStack/ServiceStack/issues/1016","labels_url":"https://api.github.com/repos/ServiceStack/ServiceStack/issues/1016/labels{/name}","comments_url":"https://api.github.com/repos/ServiceStack/ServiceStack/issues/1016/comments","events_url":"https://api.github.com/repos/ServiceStack/ServiceStack/issues/1016/events","html_url":"https://github.com/ServiceStack/ServiceStack/pull/1016","id":125075165,"number":1016,"title":"Update OrderedDictionary.cs","user":{"login":"wulfgar61","id":4852695,"avatar_url":"https://avatars.githubusercontent.com/u/4852695?v=3","gravatar_id":"","url":"https://api.github.com/users/wulfgar61","html_url":"https://github.com/wulfgar61","followers_url":"https://api.github.com/users/wulfgar61/followers","following_url":"https://api.github.com/users/wulfgar61/following{/other_user}","gists_url":"https://api.github.com/users/wulfgar61/gists{/gist_id}","starred_url":"https://api.github.com/users/wulfgar61/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wulfgar61/subscriptions","organizations_url":"https://api.github.com/users/wulfgar61/orgs","repos_url":"https://api.github.com/users/wulfgar61/repos","events_url":"https://api.github.com/users/wulfgar61/events{/privacy}","received_events_url":"https://api.github.com/users/wulfgar61/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-05T23:18:15Z","updated_at":"2016-01-06T03:49:36Z","closed_at":"2016-01-06T00:43:32Z","pull_request":{"url":"https://api.github.com/repos/ServiceStack/ServiceStack/pulls/1016","html_url":"https://github.com/ServiceStack/ServiceStack/pull/1016","diff_url":"https://github.com/ServiceStack/ServiceStack/pull/1016.diff","patch_url":"https://github.com/ServiceStack/ServiceStack/pull/1016.patch"},"body":"We are enforcing SonarQube static code analysis against our code.  It has recommended changes to the two lines I altered.  \r\n\r\nHere is the rule we are trying to satisfy with the change.\r\nWhen constraints have not been applied to restrict a generic type parameter to be a reference type, then a value type, such as a struct, could also be passed. In such cases, comparing the type parameter to null would always be false, because a struct can be empty, but never null. If a value type is truly what's expected, then the comparison should use default(). If it's not, then constraints should be added so that no value type can be passed."},"comment":{"url":"https://api.github.com/repos/ServiceStack/ServiceStack/issues/comments/169213656","html_url":"https://github.com/ServiceStack/ServiceStack/pull/1016#issuecomment-169213656","issue_url":"https://api.github.com/repos/ServiceStack/ServiceStack/issues/1016","id":169213656,"user":{"login":"Nness","id":1712143,"avatar_url":"https://avatars.githubusercontent.com/u/1712143?v=3","gravatar_id":"","url":"https://api.github.com/users/Nness","html_url":"https://github.com/Nness","followers_url":"https://api.github.com/users/Nness/followers","following_url":"https://api.github.com/users/Nness/following{/other_user}","gists_url":"https://api.github.com/users/Nness/gists{/gist_id}","starred_url":"https://api.github.com/users/Nness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nness/subscriptions","organizations_url":"https://api.github.com/users/Nness/orgs","repos_url":"https://api.github.com/users/Nness/repos","events_url":"https://api.github.com/users/Nness/events{/privacy}","received_events_url":"https://api.github.com/users/Nness/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T03:49:36Z","updated_at":"2016-01-06T03:49:36Z","body":"Just curious. If @wulfgar61's change is correct then does MSFT have to change their code too?\r\n[Dictioanry Insert Exception on Null](http://referencesource.microsoft.com/#mscorlib/system/collections/generic/dictionary.cs,321)\r\n\r\nThe thing struggling me is the comparer is not even using the comparer that manually passed into OrderedDictionary. So if I create a custom IEqualityComparer and return false when compare to default of that value. This will  still throw ArgumentNullException?\r\n\r\nAnd not saying throwing ArgumentNullException is so weird on struct and not commonly expected."}}