GitHub PullRequestReviewCommentEvent at 2014-09-15 09:35:25
Repository: Npgsql
Actor: roji
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/npgsql/Npgsql/pulls/comments/17532780","id":17532780,"diff_hunk":"@@ -468,6 +468,14 @@ internal static byte[] SingleToFloat4Text(NpgsqlNativeTypeInfo TypeInfo, Object\n             if (NativeData.Equals(float.NaN) && !arrayElement)\n                 return ASCIIByteArrays.NAN_QUOTED;\n \n+            if (NativeData.Equals(float.PositiveInfinity) && !arrayElement) {","path":"Npgsql/NpgsqlTypes/NpgsqlTypeConvNativeToBackend.cs","position":4,"original_position":4,"commit_id":"80b465561950647c9dd8203890567c7e29bd8fd2","original_commit_id":"80b465561950647c9dd8203890567c7e29bd8fd2","user":{"login":"roji","id":1862641,"avatar_url":"https://avatars.githubusercontent.com/u/1862641?v=2","gravatar_id":"018fc595a3e6b1ac5c18cb27e73a066d","url":"https://api.github.com/users/roji","html_url":"https://github.com/roji","followers_url":"https://api.github.com/users/roji/followers","following_url":"https://api.github.com/users/roji/following{/other_user}","gists_url":"https://api.github.com/users/roji/gists{/gist_id}","starred_url":"https://api.github.com/users/roji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roji/subscriptions","organizations_url":"https://api.github.com/users/roji/orgs","repos_url":"https://api.github.com/users/roji/repos","events_url":"https://api.github.com/users/roji/events{/privacy}","received_events_url":"https://api.github.com/users/roji/received_events","type":"User","site_admin":false},"body":"AFAIK the existence of NaN, PositiveInfinity and NegativeInfinity should be checked for with Double.IsNaN(), Double.IsPositiveInfinity() and Double.IsNegativeInfinity(), and never directly with == or equals. I'm curious as to how this code works, but it's definitely safer to switch to the Double.Is* methods.","created_at":"2014-09-15T09:35:25Z","updated_at":"2014-09-15T09:35:25Z","html_url":"https://github.com/npgsql/Npgsql/pull/339#discussion_r17532780","pull_request_url":"https://api.github.com/repos/npgsql/Npgsql/pulls/339","_links":{"self":{"href":"https://api.github.com/repos/npgsql/Npgsql/pulls/comments/17532780"},"html":{"href":"https://github.com/npgsql/Npgsql/pull/339#discussion_r17532780"},"pull_request":{"href":"https://api.github.com/repos/npgsql/Npgsql/pulls/339"}}},"pull_request":{"url":"https://api.github.com/repos/npgsql/Npgsql/pulls/339","id":21097677,"html_url":"https://github.com/npgsql/Npgsql/pull/339","diff_url":"https://github.com/npgsql/Npgsql/pull/339.diff","patch_url":"https://github.com/npgsql/Npgsql/pull/339.patch","issue_url":"https://api.github.com/repos/npgsql/Npgsql/issues/339","number":339,"state":"open","locked":false,"title":"Fix float double infinite value","user":{"login":"franciscojunior","id":829924,"avatar_url":"https://avatars.githubusercontent.com/u/829924?v=2","gravatar_id":"05c77136329afbf157481397fe8308ee","url":"https://api.github.com/users/franciscojunior","html_url":"https://github.com/franciscojunior","followers_url":"https://api.github.com/users/franciscojunior/followers","following_url":"https://api.github.com/users/franciscojunior/following{/other_user}","gists_url":"https://api.github.com/users/franciscojunior/gists{/gist_id}","starred_url":"https://api.github.com/users/franciscojunior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franciscojunior/subscriptions","organizations_url":"https://api.github.com/users/franciscojunior/orgs","repos_url":"https://api.github.com/users/franciscojunior/repos","events_url":"https://api.github.com/users/franciscojunior/events{/privacy}","received_events_url":"https://api.github.com/users/franciscojunior/received_events","type":"User","site_admin":false},"body":"Fix handling of float and double positive infinity values.\r\n\r\nNpgsql doesn't quote float and double values when sending to server.\r\nBut special PositiveInfinite and NegativeInfinite values need to be quoted.\r\n\r\nFix #337","created_at":"2014-09-11T15:56:12Z","updated_at":"2014-09-15T09:35:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58ac2a9345a0f962f14b7f748bf86c12290c3538","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/npgsql/Npgsql/pulls/339/commits","review_comments_url":"https://api.github.com/repos/npgsql/Npgsql/pulls/339/comments","review_comment_url":"https://api.github.com/repos/npgsql/Npgsql/pulls/comments/{number}","comments_url":"https://api.github.com/repos/npgsql/Npgsql/issues/339/comments","statuses_url":"https://api.github.com/repos/npgsql/Npgsql/statuses/80b465561950647c9dd8203890567c7e29bd8fd2","head":{"label":"franciscojunior:337-fix-float-double-infinite-value","ref":"337-fix-float-double-infinite-value","sha":"80b465561950647c9dd8203890567c7e29bd8fd2","user":{"login":"franciscojunior","id":829924,"avatar_url":"https://avatars.githubusercontent.com/u/829924?v=2","gravatar_id":"05c77136329afbf157481397fe8308ee","url":"https://api.github.com/users/franciscojunior","html_url":"https://github.com/franciscojunior","followers_url":"https://api.github.com/users/franciscojunior/followers","following_url":"https://api.github.com/users/franciscojunior/following{/other_user}","gists_url":"https://api.github.com/users/franciscojunior/gists{/gist_id}","starred_url":"https://api.github.com/users/franciscojunior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franciscojunior/subscriptions","organizations_url":"https://api.github.com/users/franciscojunior/orgs","repos_url":"https://api.github.com/users/franciscojunior/repos","events_url":"https://api.github.com/users/franciscojunior/events{/privacy}","received_events_url":"https://api.github.com/users/franciscojunior/received_events","type":"User","site_admin":false},"repo":{"id":14586677,"name":"Npgsql","full_name":"franciscojunior/Npgsql","owner":{"login":"franciscojunior","id":829924,"avatar_url":"https://avatars.githubusercontent.com/u/829924?v=2","gravatar_id":"05c77136329afbf157481397fe8308ee","url":"https://api.github.com/users/franciscojunior","html_url":"https://github.com/franciscojunior","followers_url":"https://api.github.com/users/franciscojunior/followers","following_url":"https://api.github.com/users/franciscojunior/following{/other_user}","gists_url":"https://api.github.com/users/franciscojunior/gists{/gist_id}","starred_url":"https://api.github.com/users/franciscojunior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franciscojunior/subscriptions","organizations_url":"https://api.github.com/users/franciscojunior/orgs","repos_url":"https://api.github.com/users/franciscojunior/repos","events_url":"https://api.github.com/users/franciscojunior/events{/privacy}","received_events_url":"https://api.github.com/users/franciscojunior/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/franciscojunior/Npgsql","description":"Npgsql is a .Net data provider for Postgresql. It allows any program developed for .Net framework to access a Postgresql database server. It is implemented in 100% C# code. Works with Postgresql 7.x and above. Npgsql moved from pgfoundry to github. Now this is the official repository. The previous master branch was replaced. A copy of it can be found at before-migration-from-cvs branch","fork":true,"url":"https://api.github.com/repos/franciscojunior/Npgsql","forks_url":"https://api.github.com/repos/franciscojunior/Npgsql/forks","keys_url":"https://api.github.com/repos/franciscojunior/Npgsql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/franciscojunior/Npgsql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/franciscojunior/Npgsql/teams","hooks_url":"https://api.github.com/repos/franciscojunior/Npgsql/hooks","issue_events_url":"https://api.github.com/repos/franciscojunior/Npgsql/issues/events{/number}","events_url":"https://api.github.com/repos/franciscojunior/Npgsql/events","assignees_url":"https://api.github.com/repos/franciscojunior/Npgsql/assignees{/user}","branches_url":"https://api.github.com/repos/franciscojunior/Npgsql/branches{/branch}","tags_url":"https://api.github.com/repos/franciscojunior/Npgsql/tags","blobs_url":"https://api.github.com/repos/franciscojunior/Npgsql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/franciscojunior/Npgsql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/franciscojunior/Npgsql/git/refs{/sha}","trees_url":"https://api.github.com/repos/franciscojunior/Npgsql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/franciscojunior/Npgsql/statuses/{sha}","languages_url":"https://api.github.com/repos/franciscojunior/Npgsql/languages","stargazers_url":"https://api.github.com/repos/franciscojunior/Npgsql/stargazers","contributors_url":"https://api.github.com/repos/franciscojunior/Npgsql/contributors","subscribers_url":"https://api.github.com/repos/franciscojunior/Npgsql/subscribers","subscription_url":"https://api.github.com/repos/franciscojunior/Npgsql/subscription","commits_url":"https://api.github.com/repos/franciscojunior/Npgsql/commits{/sha}","git_commits_url":"https://api.github.com/repos/franciscojunior/Npgsql/git/commits{/sha}","comments_url":"https://api.github.com/repos/franciscojunior/Npgsql/comments{/number}","issue_comment_url":"https://api.github.com/repos/franciscojunior/Npgsql/issues/comments/{number}","contents_url":"https://api.github.com/repos/franciscojunior/Npgsql/contents/{+path}","compare_url":"https://api.github.com/repos/franciscojunior/Npgsql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/franciscojunior/Npgsql/merges","archive_url":"https://api.github.com/repos/franciscojunior/Npgsql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/franciscojunior/Npgsql/downloads","issues_url":"https://api.github.com/repos/franciscojunior/Npgsql/issues{/number}","pulls_url":"https://api.github.com/repos/franciscojunior/Npgsql/pulls{/number}","milestones_url":"https://api.github.com/repos/franciscojunior/Npgsql/milestones{/number}","notifications_url":"https://api.github.com/repos/franciscojunior/Npgsql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/franciscojunior/Npgsql/labels{/name}","releases_url":"https://api.github.com/repos/franciscojunior/Npgsql/releases{/id}","created_at":"2013-11-21T12:15:54Z","updated_at":"2014-06-25T04:10:48Z","pushed_at":"2014-09-11T15:55:06Z","git_url":"git://github.com/franciscojunior/Npgsql.git","ssh_url":"git@github.com:franciscojunior/Npgsql.git","clone_url":"https://github.com/franciscojunior/Npgsql.git","svn_url":"https://github.com/franciscojunior/Npgsql","homepage":"http://www.npgsql.org","size":41663,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"npgsql:master","ref":"master","sha":"1c770c48b32df54156fd2d68b2b7a8fde0921205","user":{"login":"npgsql","id":5766497,"avatar_url":"https://avatars.githubusercontent.com/u/5766497?v=2","gravatar_id":null,"url":"https://api.github.com/users/npgsql","html_url":"https://github.com/npgsql","followers_url":"https://api.github.com/users/npgsql/followers","following_url":"https://api.github.com/users/npgsql/following{/other_user}","gists_url":"https://api.github.com/users/npgsql/gists{/gist_id}","starred_url":"https://api.github.com/users/npgsql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npgsql/subscriptions","organizations_url":"https://api.github.com/users/npgsql/orgs","repos_url":"https://api.github.com/users/npgsql/repos","events_url":"https://api.github.com/users/npgsql/events{/privacy}","received_events_url":"https://api.github.com/users/npgsql/received_events","type":"Organization","site_admin":false},"repo":{"id":2883574,"name":"Npgsql","full_name":"npgsql/Npgsql","owner":{"login":"npgsql","id":5766497,"avatar_url":"https://avatars.githubusercontent.com/u/5766497?v=2","gravatar_id":null,"url":"https://api.github.com/users/npgsql","html_url":"https://github.com/npgsql","followers_url":"https://api.github.com/users/npgsql/followers","following_url":"https://api.github.com/users/npgsql/following{/other_user}","gists_url":"https://api.github.com/users/npgsql/gists{/gist_id}","starred_url":"https://api.github.com/users/npgsql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npgsql/subscriptions","organizations_url":"https://api.github.com/users/npgsql/orgs","repos_url":"https://api.github.com/users/npgsql/repos","events_url":"https://api.github.com/users/npgsql/events{/privacy}","received_events_url":"https://api.github.com/users/npgsql/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/npgsql/Npgsql","description":"Npgsql is the .NET data provider for Postgresql. It allows any program developed for .Net framework to access a Postgresql database server. It is implemented in 100% C# code. Postgresql versions since 9.0 are officially supported, others may work.","fork":false,"url":"https://api.github.com/repos/npgsql/Npgsql","forks_url":"https://api.github.com/repos/npgsql/Npgsql/forks","keys_url":"https://api.github.com/repos/npgsql/Npgsql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/npgsql/Npgsql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/npgsql/Npgsql/teams","hooks_url":"https://api.github.com/repos/npgsql/Npgsql/hooks","issue_events_url":"https://api.github.com/repos/npgsql/Npgsql/issues/events{/number}","events_url":"https://api.github.com/repos/npgsql/Npgsql/events","assignees_url":"https://api.github.com/repos/npgsql/Npgsql/assignees{/user}","branches_url":"https://api.github.com/repos/npgsql/Npgsql/branches{/branch}","tags_url":"https://api.github.com/repos/npgsql/Npgsql/tags","blobs_url":"https://api.github.com/repos/npgsql/Npgsql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/npgsql/Npgsql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/npgsql/Npgsql/git/refs{/sha}","trees_url":"https://api.github.com/repos/npgsql/Npgsql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/npgsql/Npgsql/statuses/{sha}","languages_url":"https://api.github.com/repos/npgsql/Npgsql/languages","stargazers_url":"https://api.github.com/repos/npgsql/Npgsql/stargazers","contributors_url":"https://api.github.com/repos/npgsql/Npgsql/contributors","subscribers_url":"https://api.github.com/repos/npgsql/Npgsql/subscribers","subscription_url":"https://api.github.com/repos/npgsql/Npgsql/subscription","commits_url":"https://api.github.com/repos/npgsql/Npgsql/commits{/sha}","git_commits_url":"https://api.github.com/repos/npgsql/Npgsql/git/commits{/sha}","comments_url":"https://api.github.com/repos/npgsql/Npgsql/comments{/number}","issue_comment_url":"https://api.github.com/repos/npgsql/Npgsql/issues/comments/{number}","contents_url":"https://api.github.com/repos/npgsql/Npgsql/contents/{+path}","compare_url":"https://api.github.com/repos/npgsql/Npgsql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/npgsql/Npgsql/merges","archive_url":"https://api.github.com/repos/npgsql/Npgsql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/npgsql/Npgsql/downloads","issues_url":"https://api.github.com/repos/npgsql/Npgsql/issues{/number}","pulls_url":"https://api.github.com/repos/npgsql/Npgsql/pulls{/number}","milestones_url":"https://api.github.com/repos/npgsql/Npgsql/milestones{/number}","notifications_url":"https://api.github.com/repos/npgsql/Npgsql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/npgsql/Npgsql/labels{/name}","releases_url":"https://api.github.com/repos/npgsql/Npgsql/releases{/id}","created_at":"2011-11-30T14:13:32Z","updated_at":"2014-09-13T08:40:07Z","pushed_at":"2014-09-15T06:24:05Z","git_url":"git://github.com/npgsql/Npgsql.git","ssh_url":"git@github.com:npgsql/Npgsql.git","clone_url":"https://github.com/npgsql/Npgsql.git","svn_url":"https://github.com/npgsql/Npgsql","homepage":"http://www.npgsql.org","size":49159,"stargazers_count":260,"watchers_count":260,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":134,"mirror_url":null,"open_issues_count":73,"forks":134,"open_issues":73,"watchers":260,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/npgsql/Npgsql/pulls/339"},"html":{"href":"https://github.com/npgsql/Npgsql/pull/339"},"issue":{"href":"https://api.github.com/repos/npgsql/Npgsql/issues/339"},"comments":{"href":"https://api.github.com/repos/npgsql/Npgsql/issues/339/comments"},"review_comments":{"href":"https://api.github.com/repos/npgsql/Npgsql/pulls/339/comments"},"review_comment":{"href":"https://api.github.com/repos/npgsql/Npgsql/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/npgsql/Npgsql/pulls/339/commits"},"statuses":{"href":"https://api.github.com/repos/npgsql/Npgsql/statuses/80b465561950647c9dd8203890567c7e29bd8fd2"}}}}