{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Common/pulls/comments/42572194","id":42572194,"diff_hunk":"@@ -263,13 +292,15 @@ public void Contains(StringValues stringValues, string[] expected)\n         public void CopyTo(StringValues stringValues, string[] expected)\n         {\n             ICollection<string> collection = stringValues;\n-\n             string[] tooSmall = new string[0];\n-            Assert.Throws<ArgumentException>(() => collection.CopyTo(tooSmall, 0));\n-\n             string[] actual = new string[expected.Length];\n-            Assert.Throws<ArgumentOutOfRangeException>(() => collection.CopyTo(actual, -1));\n-            Assert.Throws<ArgumentException>(() => collection.CopyTo(actual, actual.Length + 1));\n+\n+            if (collection.Count > 0)\n+            {\n+                Assert.Throws<ArgumentException>(() => collection.CopyTo(tooSmall, 0));\n+                Assert.Throws<ArgumentOutOfRangeException>(() => collection.CopyTo(actual, -1));\n+                Assert.Throws<ArgumentException>(() => collection.CopyTo(actual, actual.Length + 1));","path":"test/Microsoft.Extensions.Primitives.Tests/StringValuesTests.cs","position":62,"original_position":62,"commit_id":"5fce44edcb30aaf8decd107ac9c7157e5828419b","original_commit_id":"5fce44edcb30aaf8decd107ac9c7157e5828419b","user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"body":"Separate sections or actually separate tests? (as just gathered them for the if test)","created_at":"2015-10-21T00:33:12Z","updated_at":"2015-10-21T00:33:12Z","html_url":"https://github.com/aspnet/Common/pull/55#discussion_r42572194","pull_request_url":"https://api.github.com/repos/aspnet/Common/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Common/pulls/comments/42572194"},"html":{"href":"https://github.com/aspnet/Common/pull/55#discussion_r42572194"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Common/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Common/pulls/55","id":47984595,"html_url":"https://github.com/aspnet/Common/pull/55","diff_url":"https://github.com/aspnet/Common/pull/55.diff","patch_url":"https://github.com/aspnet/Common/pull/55.patch","issue_url":"https://api.github.com/repos/aspnet/Common/issues/55","number":55,"state":"open","locked":false,"title":"Allow non-boxing equality for StringValues","user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"body":"Currently testing for equality with StringValues will box; this allows a non boxing path.\r\n\r\nWhat is equal may be up for debate? \r\n\r\nAlso see https://github.com/aspnet/HttpAbstractions/issues/384\r\n\r\nNo idea what ```Object.Equals``` is thinks currently equal though.","created_at":"2015-10-17T11:07:35Z","updated_at":"2015-10-21T00:33:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a610be6d484a85c57ed721581f91f31ea841b64","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Common/pulls/55/commits","review_comments_url":"https://api.github.com/repos/aspnet/Common/pulls/55/comments","review_comment_url":"https://api.github.com/repos/aspnet/Common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Common/issues/55/comments","statuses_url":"https://api.github.com/repos/aspnet/Common/statuses/5fce44edcb30aaf8decd107ac9c7157e5828419b","head":{"label":"benaadams:non-boxing-equality","ref":"non-boxing-equality","sha":"5fce44edcb30aaf8decd107ac9c7157e5828419b","user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"repo":{"id":44432538,"name":"Common","full_name":"benaadams/Common","owner":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benaadams/Common","description":"A repository for shared files to be consumed across the ASPNET repos","fork":true,"url":"https://api.github.com/repos/benaadams/Common","forks_url":"https://api.github.com/repos/benaadams/Common/forks","keys_url":"https://api.github.com/repos/benaadams/Common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benaadams/Common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benaadams/Common/teams","hooks_url":"https://api.github.com/repos/benaadams/Common/hooks","issue_events_url":"https://api.github.com/repos/benaadams/Common/issues/events{/number}","events_url":"https://api.github.com/repos/benaadams/Common/events","assignees_url":"https://api.github.com/repos/benaadams/Common/assignees{/user}","branches_url":"https://api.github.com/repos/benaadams/Common/branches{/branch}","tags_url":"https://api.github.com/repos/benaadams/Common/tags","blobs_url":"https://api.github.com/repos/benaadams/Common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benaadams/Common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benaadams/Common/git/refs{/sha}","trees_url":"https://api.github.com/repos/benaadams/Common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benaadams/Common/statuses/{sha}","languages_url":"https://api.github.com/repos/benaadams/Common/languages","stargazers_url":"https://api.github.com/repos/benaadams/Common/stargazers","contributors_url":"https://api.github.com/repos/benaadams/Common/contributors","subscribers_url":"https://api.github.com/repos/benaadams/Common/subscribers","subscription_url":"https://api.github.com/repos/benaadams/Common/subscription","commits_url":"https://api.github.com/repos/benaadams/Common/commits{/sha}","git_commits_url":"https://api.github.com/repos/benaadams/Common/git/commits{/sha}","comments_url":"https://api.github.com/repos/benaadams/Common/comments{/number}","issue_comment_url":"https://api.github.com/repos/benaadams/Common/issues/comments{/number}","contents_url":"https://api.github.com/repos/benaadams/Common/contents/{+path}","compare_url":"https://api.github.com/repos/benaadams/Common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benaadams/Common/merges","archive_url":"https://api.github.com/repos/benaadams/Common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benaadams/Common/downloads","issues_url":"https://api.github.com/repos/benaadams/Common/issues{/number}","pulls_url":"https://api.github.com/repos/benaadams/Common/pulls{/number}","milestones_url":"https://api.github.com/repos/benaadams/Common/milestones{/number}","notifications_url":"https://api.github.com/repos/benaadams/Common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benaadams/Common/labels{/name}","releases_url":"https://api.github.com/repos/benaadams/Common/releases{/id}","created_at":"2015-10-17T10:16:08Z","updated_at":"2015-10-17T10:16:09Z","pushed_at":"2015-10-20T23:59:33Z","git_url":"git://github.com/benaadams/Common.git","ssh_url":"git@github.com:benaadams/Common.git","clone_url":"https://github.com/benaadams/Common.git","svn_url":"https://github.com/benaadams/Common","homepage":null,"size":977,"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":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"bc455e9be033445d7a4dc8d688f15465536c9d7c","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":30932325,"name":"Common","full_name":"aspnet/Common","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Common","description":"A repository for shared files to be consumed across the ASPNET repos","fork":false,"url":"https://api.github.com/repos/aspnet/Common","forks_url":"https://api.github.com/repos/aspnet/Common/forks","keys_url":"https://api.github.com/repos/aspnet/Common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Common/teams","hooks_url":"https://api.github.com/repos/aspnet/Common/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Common/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Common/events","assignees_url":"https://api.github.com/repos/aspnet/Common/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Common/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Common/tags","blobs_url":"https://api.github.com/repos/aspnet/Common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Common/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Common/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Common/languages","stargazers_url":"https://api.github.com/repos/aspnet/Common/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Common/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Common/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Common/subscription","commits_url":"https://api.github.com/repos/aspnet/Common/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Common/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Common/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Common/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Common/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Common/merges","archive_url":"https://api.github.com/repos/aspnet/Common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Common/downloads","issues_url":"https://api.github.com/repos/aspnet/Common/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Common/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Common/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Common/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Common/releases{/id}","created_at":"2015-02-17T19:02:08Z","updated_at":"2015-10-08T04:04:25Z","pushed_at":"2015-10-20T23:59:34Z","git_url":"git://github.com/aspnet/Common.git","ssh_url":"git@github.com:aspnet/Common.git","clone_url":"https://github.com/aspnet/Common.git","svn_url":"https://github.com/aspnet/Common","homepage":null,"size":977,"stargazers_count":10,"watchers_count":10,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":10,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Common/pulls/55"},"html":{"href":"https://github.com/aspnet/Common/pull/55"},"issue":{"href":"https://api.github.com/repos/aspnet/Common/issues/55"},"comments":{"href":"https://api.github.com/repos/aspnet/Common/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Common/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Common/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Common/statuses/5fce44edcb30aaf8decd107ac9c7157e5828419b"}}}}