{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/comments/62367060","id":62367060,"diff_hunk":"@@ -144,43 +165,67 @@ void ICollection.CopyTo(Array array, int index)\n         {\n             get\n             {\n-                return InnerList[index];\n+                return List[index];\n             }\n             set\n             {\n-                InnerList[index] = value;\n+                if (value == null)\n+                {\n+                    throw new ArgumentNullException(nameof(value));\n+                }\n+\n+                List[index] = value;\n             }\n         }\n \n         bool IList.Contains(Object value)\n         {\n-            return InnerList.Contains(value);\n+            return List.Contains(value);\n         }\n \n         int IList.Add(Object value)\n         {\n+            if (value == null)\n+            {\n+                throw new ArgumentException(nameof(value));\n+            }\n+\n             return List.Add(value);\n         }\n \n         void IList.Remove(Object value)\n         {\n-            int index = InnerList.IndexOf(value);\n-            InnerList.RemoveAt(index);\n+            if (value == null)\n+            {\n+                throw new ArgumentException(nameof(value));\n+            }\n+\n+            var attribute = value as XmlAnyElementAttribute;\n+            if (attribute == null)\n+            {\n+                throw new ArgumentException(SR.Arg_RemoveArgNotFound);\n+            }\n+            Remove(attribute);\n         }\n \n         int IList.IndexOf(Object value)\n         {\n-            return InnerList.IndexOf(value);\n+            return List.IndexOf(value);\n         }\n \n         void IList.Insert(int index, Object value)\n         {\n-            InnerList.Insert(index, value);\n+            if (value == null)\n+            {\n+                throw new ArgumentNullException(nameof(value));\n+            }\n+\n+            List.Insert(index, value);\n         }\n \n-        public IEnumerator GetEnumerator()\n+        IEnumerator IEnumerable.GetEnumerator()","path":"src/System.Xml.XmlSerializer/src/System/Xml/Serialization/XmlAnyElementAttributes.cs","position":253,"original_position":253,"commit_id":"0ebc64a21e23b1a185b8ffc473f4bb441773b009","original_commit_id":"0ebc64a21e23b1a185b8ffc473f4bb441773b009","user":{"login":"shmao","id":12262109,"avatar_url":"https://avatars.githubusercontent.com/u/12262109?v=3","gravatar_id":"","url":"https://api.github.com/users/shmao","html_url":"https://github.com/shmao","followers_url":"https://api.github.com/users/shmao/followers","following_url":"https://api.github.com/users/shmao/following{/other_user}","gists_url":"https://api.github.com/users/shmao/gists{/gist_id}","starred_url":"https://api.github.com/users/shmao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shmao/subscriptions","organizations_url":"https://api.github.com/users/shmao/orgs","repos_url":"https://api.github.com/users/shmao/repos","events_url":"https://api.github.com/users/shmao/events{/privacy}","received_events_url":"https://api.github.com/users/shmao/received_events","type":"User","site_admin":false},"body":"Why do we need this change? These two forms are not equivalent, and thus this is a breaking change.","created_at":"2016-05-06T18:05:23Z","updated_at":"2016-05-06T18:05:23Z","html_url":"https://github.com/dotnet/corefx/pull/8328#discussion_r62367060","pull_request_url":"https://api.github.com/repos/dotnet/corefx/pulls/8328","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments/62367060"},"html":{"href":"https://github.com/dotnet/corefx/pull/8328#discussion_r62367060"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/8328"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/8328","id":69081838,"html_url":"https://github.com/dotnet/corefx/pull/8328","diff_url":"https://github.com/dotnet/corefx/pull/8328.diff","patch_url":"https://github.com/dotnet/corefx/pull/8328.patch","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/8328","number":8328,"state":"open","locked":false,"title":"Fix XmlAttributes.Remove behavior difference","user":{"login":"khdang","id":10590707,"avatar_url":"https://avatars.githubusercontent.com/u/10590707?v=3","gravatar_id":"","url":"https://api.github.com/users/khdang","html_url":"https://github.com/khdang","followers_url":"https://api.github.com/users/khdang/followers","following_url":"https://api.github.com/users/khdang/following{/other_user}","gists_url":"https://api.github.com/users/khdang/gists{/gist_id}","starred_url":"https://api.github.com/users/khdang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khdang/subscriptions","organizations_url":"https://api.github.com/users/khdang/orgs","repos_url":"https://api.github.com/users/khdang/repos","events_url":"https://api.github.com/users/khdang/events{/privacy}","received_events_url":"https://api.github.com/users/khdang/received_events","type":"User","site_admin":false},"body":"- The issue is due to implementation difference XmlAttributes.Remove throws on Desktop if item is not found whereas there is no exception on CoreCLR. \r\n- Since we don't want to update XmlAttributes back to legacy type CollectionBase, I'm changing these XmlAttributes type to derive from generic List<> and override Remove() method to throw on missing item.\r\n- Fix #5831 and also #7837\r\n\r\ncc: @SGuyGe @zhenlan @shmao ","created_at":"2016-05-05T22:37:43Z","updated_at":"2016-05-06T18:05:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08fa74ae57eaee6f21bbb62bdad5466b0ead6026","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefx/pulls/8328/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefx/pulls/8328/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/8328/comments","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/0ebc64a21e23b1a185b8ffc473f4bb441773b009","head":{"label":"khdang:fix_xmlattributes_remove","ref":"fix_xmlattributes_remove","sha":"0ebc64a21e23b1a185b8ffc473f4bb441773b009","user":{"login":"khdang","id":10590707,"avatar_url":"https://avatars.githubusercontent.com/u/10590707?v=3","gravatar_id":"","url":"https://api.github.com/users/khdang","html_url":"https://github.com/khdang","followers_url":"https://api.github.com/users/khdang/followers","following_url":"https://api.github.com/users/khdang/following{/other_user}","gists_url":"https://api.github.com/users/khdang/gists{/gist_id}","starred_url":"https://api.github.com/users/khdang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khdang/subscriptions","organizations_url":"https://api.github.com/users/khdang/orgs","repos_url":"https://api.github.com/users/khdang/repos","events_url":"https://api.github.com/users/khdang/events{/privacy}","received_events_url":"https://api.github.com/users/khdang/received_events","type":"User","site_admin":false},"repo":{"id":33624190,"name":"corefx","full_name":"khdang/corefx","owner":{"login":"khdang","id":10590707,"avatar_url":"https://avatars.githubusercontent.com/u/10590707?v=3","gravatar_id":"","url":"https://api.github.com/users/khdang","html_url":"https://github.com/khdang","followers_url":"https://api.github.com/users/khdang/followers","following_url":"https://api.github.com/users/khdang/following{/other_user}","gists_url":"https://api.github.com/users/khdang/gists{/gist_id}","starred_url":"https://api.github.com/users/khdang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khdang/subscriptions","organizations_url":"https://api.github.com/users/khdang/orgs","repos_url":"https://api.github.com/users/khdang/repos","events_url":"https://api.github.com/users/khdang/events{/privacy}","received_events_url":"https://api.github.com/users/khdang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/khdang/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others.","fork":true,"url":"https://api.github.com/repos/khdang/corefx","forks_url":"https://api.github.com/repos/khdang/corefx/forks","keys_url":"https://api.github.com/repos/khdang/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/khdang/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/khdang/corefx/teams","hooks_url":"https://api.github.com/repos/khdang/corefx/hooks","issue_events_url":"https://api.github.com/repos/khdang/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/khdang/corefx/events","assignees_url":"https://api.github.com/repos/khdang/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/khdang/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/khdang/corefx/tags","blobs_url":"https://api.github.com/repos/khdang/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/khdang/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/khdang/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/khdang/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/khdang/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/khdang/corefx/languages","stargazers_url":"https://api.github.com/repos/khdang/corefx/stargazers","contributors_url":"https://api.github.com/repos/khdang/corefx/contributors","subscribers_url":"https://api.github.com/repos/khdang/corefx/subscribers","subscription_url":"https://api.github.com/repos/khdang/corefx/subscription","commits_url":"https://api.github.com/repos/khdang/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/khdang/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/khdang/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/khdang/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/khdang/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/khdang/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/khdang/corefx/merges","archive_url":"https://api.github.com/repos/khdang/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/khdang/corefx/downloads","issues_url":"https://api.github.com/repos/khdang/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/khdang/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/khdang/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/khdang/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/khdang/corefx/labels{/name}","releases_url":"https://api.github.com/repos/khdang/corefx/releases{/id}","deployments_url":"https://api.github.com/repos/khdang/corefx/deployments","created_at":"2015-04-08T18:20:35Z","updated_at":"2016-02-10T22:31:56Z","pushed_at":"2016-05-06T17:19:33Z","git_url":"git://github.com/khdang/corefx.git","ssh_url":"git@github.com:khdang/corefx.git","clone_url":"https://github.com/khdang/corefx.git","svn_url":"https://github.com/khdang/corefx","homepage":"","size":66965,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"dotnet:master","ref":"master","sha":"4a16ad9dfdbe3dd82d294e9746568f8e15b62fd4","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":26295345,"name":"corefx","full_name":"dotnet/corefx","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others.","fork":false,"url":"https://api.github.com/repos/dotnet/corefx","forks_url":"https://api.github.com/repos/dotnet/corefx/forks","keys_url":"https://api.github.com/repos/dotnet/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corefx/teams","hooks_url":"https://api.github.com/repos/dotnet/corefx/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corefx/events","assignees_url":"https://api.github.com/repos/dotnet/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corefx/tags","blobs_url":"https://api.github.com/repos/dotnet/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corefx/languages","stargazers_url":"https://api.github.com/repos/dotnet/corefx/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corefx/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corefx/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corefx/subscription","commits_url":"https://api.github.com/repos/dotnet/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corefx/merges","archive_url":"https://api.github.com/repos/dotnet/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corefx/downloads","issues_url":"https://api.github.com/repos/dotnet/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corefx/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corefx/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/corefx/deployments","created_at":"2014-11-06T23:42:48Z","updated_at":"2016-05-06T17:26:28Z","pushed_at":"2016-05-06T17:41:38Z","git_url":"git://github.com/dotnet/corefx.git","ssh_url":"git@github.com:dotnet/corefx.git","clone_url":"https://github.com/dotnet/corefx.git","svn_url":"https://github.com/dotnet/corefx","homepage":"http://dotnet.github.io/","size":92136,"stargazers_count":9629,"watchers_count":9629,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2298,"mirror_url":null,"open_issues_count":1014,"forks":2298,"open_issues":1014,"watchers":9629,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/8328"},"html":{"href":"https://github.com/dotnet/corefx/pull/8328"},"issue":{"href":"https://api.github.com/repos/dotnet/corefx/issues/8328"},"comments":{"href":"https://api.github.com/repos/dotnet/corefx/issues/8328/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/8328/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/8328/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefx/statuses/0ebc64a21e23b1a185b8ffc473f4bb441773b009"}}}}