{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/comments/59479504","id":59479504,"diff_hunk":"@@ -2,64 +2,36 @@\n // The .NET Foundation licenses this file to you under the MIT license.\n // See the LICENSE file in the project root for more information.\n \n-\n-\n-//------------------------------------------------------------------------------\n-\n using System.Collections;\n-\n+using System.Collections.Generic;\n \n namespace System.Data.SqlClient\n {\n     public sealed class SqlErrorCollection : ICollection\n     {\n-        private ArrayList _errors = new ArrayList();\n+        // Ideally this would be typed as List<SqlError>, but that would make the non-generic\n+        // CopyTo behave differently than the full framework (which uses ArrayList), throwing\n+        // ArgumentException instead of the expected InvalidCastException for incompatible types.\n+        // Instead, we use List<object>, which makes the non-generic CopyTo behave like\n+        // ArrayList.CopyTo.\n+        private readonly List<object> _errors = new List<object>();\n \n-        internal SqlErrorCollection()\n-        {\n-        }\n+        internal SqlErrorCollection() { }\n \n-        public void CopyTo(Array array, int index)\n-        {\n-            _errors.CopyTo(array, index);\n-        }\n+        public void CopyTo(Array array, int index) => ((ICollection)_errors).CopyTo(array, index);","path":"src/System.Data.SqlClient/src/System/Data/SqlClient/SqlErrorCollection.cs","position":33,"original_position":33,"commit_id":"7397108c1e29a4522fd469320db701aa9600e5ad","original_commit_id":"e71d7252dab9853bec1f315fc56f187da18e8c40","user":{"login":"jamesqo","id":9159214,"avatar_url":"https://avatars.githubusercontent.com/u/9159214?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesqo","html_url":"https://github.com/jamesqo","followers_url":"https://api.github.com/users/jamesqo/followers","following_url":"https://api.github.com/users/jamesqo/following{/other_user}","gists_url":"https://api.github.com/users/jamesqo/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesqo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesqo/subscriptions","organizations_url":"https://api.github.com/users/jamesqo/orgs","repos_url":"https://api.github.com/users/jamesqo/repos","events_url":"https://api.github.com/users/jamesqo/events{/privacy}","received_events_url":"https://api.github.com/users/jamesqo/received_events","type":"User","site_admin":false},"body":"Ditto; didn't realize this was public.","created_at":"2016-04-13T01:02:17Z","updated_at":"2016-04-13T01:02:17Z","html_url":"https://github.com/dotnet/corefx/pull/7691#discussion_r59479504","pull_request_url":"https://api.github.com/repos/dotnet/corefx/pulls/7691","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments/59479504"},"html":{"href":"https://github.com/dotnet/corefx/pull/7691#discussion_r59479504"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/7691"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/7691","id":66236825,"html_url":"https://github.com/dotnet/corefx/pull/7691","diff_url":"https://github.com/dotnet/corefx/pull/7691.diff","patch_url":"https://github.com/dotnet/corefx/pull/7691.patch","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/7691","number":7691,"state":"open","locked":false,"title":"SqlClient: Remove dependency on System.Collections.NonGeneric","user":{"login":"justinvp","id":710598,"avatar_url":"https://avatars.githubusercontent.com/u/710598?v=3","gravatar_id":"","url":"https://api.github.com/users/justinvp","html_url":"https://github.com/justinvp","followers_url":"https://api.github.com/users/justinvp/followers","following_url":"https://api.github.com/users/justinvp/following{/other_user}","gists_url":"https://api.github.com/users/justinvp/gists{/gist_id}","starred_url":"https://api.github.com/users/justinvp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinvp/subscriptions","organizations_url":"https://api.github.com/users/justinvp/orgs","repos_url":"https://api.github.com/users/justinvp/repos","events_url":"https://api.github.com/users/justinvp/events{/privacy}","received_events_url":"https://api.github.com/users/justinvp/received_events","type":"User","site_admin":false},"body":"Two commits:\r\n\r\n 1. The first commit adds some more tests, along with minor cleanup to existing tests. The tests pass on the full framework and before & after the changes in the second commit.\r\n\r\n 2. The second commit removes SqlClient's dependency on the non-generic collections.\r\n\r\nFixes #7637\r\n\r\ncc: @saurabh500, @stephentoub, @jamesqo \r\n\r\n---\r\n\r\nNote: The change to `FieldNameLookup.cs` in this PR overlaps with changes in #7686, so I'll need to rebase this if #7686 is merged first.\r\n\r\n---\r\n\r\n@saurabh500, there were some changes that I couldn't easily write functional tests for... Would you mind running the manual tests before merging?","created_at":"2016-04-12T22:11:55Z","updated_at":"2016-04-13T01:02:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f0f2bbaaa4a7c33af04ecbbb9b6b6488e44eaca1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefx/pulls/7691/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefx/pulls/7691/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/7691/comments","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/7397108c1e29a4522fd469320db701aa9600e5ad","head":{"label":"justinvp:sqlclient_nongeneric","ref":"sqlclient_nongeneric","sha":"7397108c1e29a4522fd469320db701aa9600e5ad","user":{"login":"justinvp","id":710598,"avatar_url":"https://avatars.githubusercontent.com/u/710598?v=3","gravatar_id":"","url":"https://api.github.com/users/justinvp","html_url":"https://github.com/justinvp","followers_url":"https://api.github.com/users/justinvp/followers","following_url":"https://api.github.com/users/justinvp/following{/other_user}","gists_url":"https://api.github.com/users/justinvp/gists{/gist_id}","starred_url":"https://api.github.com/users/justinvp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinvp/subscriptions","organizations_url":"https://api.github.com/users/justinvp/orgs","repos_url":"https://api.github.com/users/justinvp/repos","events_url":"https://api.github.com/users/justinvp/events{/privacy}","received_events_url":"https://api.github.com/users/justinvp/received_events","type":"User","site_admin":false},"repo":{"id":28229041,"name":"corefx","full_name":"justinvp/corefx","owner":{"login":"justinvp","id":710598,"avatar_url":"https://avatars.githubusercontent.com/u/710598?v=3","gravatar_id":"","url":"https://api.github.com/users/justinvp","html_url":"https://github.com/justinvp","followers_url":"https://api.github.com/users/justinvp/followers","following_url":"https://api.github.com/users/justinvp/following{/other_user}","gists_url":"https://api.github.com/users/justinvp/gists{/gist_id}","starred_url":"https://api.github.com/users/justinvp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinvp/subscriptions","organizations_url":"https://api.github.com/users/justinvp/orgs","repos_url":"https://api.github.com/users/justinvp/repos","events_url":"https://api.github.com/users/justinvp/events{/privacy}","received_events_url":"https://api.github.com/users/justinvp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/justinvp/corefx","description":"This repository contains the foundational libraries that make up the .NET Core development stack.","fork":true,"url":"https://api.github.com/repos/justinvp/corefx","forks_url":"https://api.github.com/repos/justinvp/corefx/forks","keys_url":"https://api.github.com/repos/justinvp/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/justinvp/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/justinvp/corefx/teams","hooks_url":"https://api.github.com/repos/justinvp/corefx/hooks","issue_events_url":"https://api.github.com/repos/justinvp/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/justinvp/corefx/events","assignees_url":"https://api.github.com/repos/justinvp/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/justinvp/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/justinvp/corefx/tags","blobs_url":"https://api.github.com/repos/justinvp/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/justinvp/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/justinvp/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/justinvp/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/justinvp/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/justinvp/corefx/languages","stargazers_url":"https://api.github.com/repos/justinvp/corefx/stargazers","contributors_url":"https://api.github.com/repos/justinvp/corefx/contributors","subscribers_url":"https://api.github.com/repos/justinvp/corefx/subscribers","subscription_url":"https://api.github.com/repos/justinvp/corefx/subscription","commits_url":"https://api.github.com/repos/justinvp/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/justinvp/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/justinvp/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/justinvp/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/justinvp/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/justinvp/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/justinvp/corefx/merges","archive_url":"https://api.github.com/repos/justinvp/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/justinvp/corefx/downloads","issues_url":"https://api.github.com/repos/justinvp/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/justinvp/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/justinvp/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/justinvp/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/justinvp/corefx/labels{/name}","releases_url":"https://api.github.com/repos/justinvp/corefx/releases{/id}","deployments_url":"https://api.github.com/repos/justinvp/corefx/deployments","created_at":"2014-12-19T12:43:43Z","updated_at":"2016-01-11T17:38:50Z","pushed_at":"2016-04-13T00:34:33Z","git_url":"git://github.com/justinvp/corefx.git","ssh_url":"git@github.com:justinvp/corefx.git","clone_url":"https://github.com/justinvp/corefx.git","svn_url":"https://github.com/justinvp/corefx","homepage":"","size":63267,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"d228cf36d3768064478baf2af7153d4b0e2aaf5c","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-04-12T20:28:58Z","pushed_at":"2016-04-13T00:38:22Z","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":86398,"stargazers_count":9486,"watchers_count":9486,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2243,"mirror_url":null,"open_issues_count":947,"forks":2243,"open_issues":947,"watchers":9486,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/7691"},"html":{"href":"https://github.com/dotnet/corefx/pull/7691"},"issue":{"href":"https://api.github.com/repos/dotnet/corefx/issues/7691"},"comments":{"href":"https://api.github.com/repos/dotnet/corefx/issues/7691/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/7691/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/7691/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefx/statuses/7397108c1e29a4522fd469320db701aa9600e5ad"}}}}