{"action":"created","comment":{"url":"https://api.github.com/repos/pgjdbc/pgjdbc/pulls/comments/84468532","pull_request_review_id":5246304,"id":84468532,"diff_hunk":"@@ -0,0 +1,187 @@\n+package org.postgresql.util;\n+\n+//#if mvn.project.property.postgresql.jdbc.spec >= \"JDBC4.1\"\n+import static java.nio.charset.StandardCharsets.UTF_8;\n+//#endif\n+\n+import java.io.IOException;\n+import java.io.InputStream;\n+import java.io.Reader;\n+import java.nio.ByteBuffer;\n+import java.nio.CharBuffer;\n+import java.nio.charset.Charset;\n+import java.nio.charset.CharsetEncoder;\n+import java.nio.charset.CoderResult;\n+import java.nio.charset.MalformedInputException;\n+\n+public class ReaderInputStream extends InputStream {\n+  private static final int DEFAULT_CHAR_BUFFER_SIZE = 8 * 1024;\n+\n+  //#if mvn.project.property.postgresql.jdbc.spec < \"JDBC4.1\"\n+  private static final Charset UTF_8 = Charset.availableCharsets().get(\"UTF-8\");","path":"pgjdbc/src/main/java/org/postgresql/util/ReaderInputStream.java","position":21,"original_position":21,"commit_id":"7dadc74d682f2d0b8d2029556ada41b6eb3114ce","original_commit_id":"7dadc74d682f2d0b8d2029556ada41b6eb3114ce","user":{"login":"bd-infor","id":22893825,"avatar_url":"https://avatars.githubusercontent.com/u/22893825?v=3","gravatar_id":"","url":"https://api.github.com/users/bd-infor","html_url":"https://github.com/bd-infor","followers_url":"https://api.github.com/users/bd-infor/followers","following_url":"https://api.github.com/users/bd-infor/following{/other_user}","gists_url":"https://api.github.com/users/bd-infor/gists{/gist_id}","starred_url":"https://api.github.com/users/bd-infor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bd-infor/subscriptions","organizations_url":"https://api.github.com/users/bd-infor/orgs","repos_url":"https://api.github.com/users/bd-infor/repos","events_url":"https://api.github.com/users/bd-infor/events{/privacy}","received_events_url":"https://api.github.com/users/bd-infor/received_events","type":"User","site_admin":false},"body":"1. Charset.forName(\"UTF-8\") throws an exception. Charset.availableCharsets().get(\"UTF-8\") does not. Given that \"UTF-8\" is a mandatory charset, it doesn't make a huge difference, but some static analyzers complain if exceptions can be thrown during class initialization.\r\n\r\n1. I couldn't find any discussion of how long pgjdbc intends to maintain Java 6 compatibility. Given that Java 6 has been out of support for years, I would consider dropping Java 6 support to be a better option. As a compromise, I coded it to use StandardCharset when available and fall back to a static final class member for Java 6.","created_at":"2016-10-21T12:18:47Z","updated_at":"2016-10-21T12:18:47Z","html_url":"https://github.com/pgjdbc/pgjdbc/pull/671#discussion_r84468532","pull_request_url":"https://api.github.com/repos/pgjdbc/pgjdbc/pulls/671","_links":{"self":{"href":"https://api.github.com/repos/pgjdbc/pgjdbc/pulls/comments/84468532"},"html":{"href":"https://github.com/pgjdbc/pgjdbc/pull/671#discussion_r84468532"},"pull_request":{"href":"https://api.github.com/repos/pgjdbc/pgjdbc/pulls/671"}}},"pull_request":{"url":"https://api.github.com/repos/pgjdbc/pgjdbc/pulls/671","id":90277330,"html_url":"https://github.com/pgjdbc/pgjdbc/pull/671","diff_url":"https://github.com/pgjdbc/pgjdbc/pull/671.diff","patch_url":"https://github.com/pgjdbc/pgjdbc/pull/671.patch","issue_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/671","number":671,"state":"open","locked":false,"title":"add support for PreparedStatement.setCharacterStream(int, Reader)","user":{"login":"bd-infor","id":22893825,"avatar_url":"https://avatars.githubusercontent.com/u/22893825?v=3","gravatar_id":"","url":"https://api.github.com/users/bd-infor","html_url":"https://github.com/bd-infor","followers_url":"https://api.github.com/users/bd-infor/followers","following_url":"https://api.github.com/users/bd-infor/following{/other_user}","gists_url":"https://api.github.com/users/bd-infor/gists{/gist_id}","starred_url":"https://api.github.com/users/bd-infor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bd-infor/subscriptions","organizations_url":"https://api.github.com/users/bd-infor/orgs","repos_url":"https://api.github.com/users/bd-infor/repos","events_url":"https://api.github.com/users/bd-infor/events{/privacy}","received_events_url":"https://api.github.com/users/bd-infor/received_events","type":"User","site_admin":false},"body":"First cut in order to get feedback.","created_at":"2016-10-20T20:42:55Z","updated_at":"2016-10-21T12:18:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"34d233233b8729b188ece5e391a7046e10a1225e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pgjdbc/pgjdbc/pulls/671/commits","review_comments_url":"https://api.github.com/repos/pgjdbc/pgjdbc/pulls/671/comments","review_comment_url":"https://api.github.com/repos/pgjdbc/pgjdbc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/671/comments","statuses_url":"https://api.github.com/repos/pgjdbc/pgjdbc/statuses/7dadc74d682f2d0b8d2029556ada41b6eb3114ce","head":{"label":"bd-infor:master","ref":"master","sha":"7dadc74d682f2d0b8d2029556ada41b6eb3114ce","user":{"login":"bd-infor","id":22893825,"avatar_url":"https://avatars.githubusercontent.com/u/22893825?v=3","gravatar_id":"","url":"https://api.github.com/users/bd-infor","html_url":"https://github.com/bd-infor","followers_url":"https://api.github.com/users/bd-infor/followers","following_url":"https://api.github.com/users/bd-infor/following{/other_user}","gists_url":"https://api.github.com/users/bd-infor/gists{/gist_id}","starred_url":"https://api.github.com/users/bd-infor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bd-infor/subscriptions","organizations_url":"https://api.github.com/users/bd-infor/orgs","repos_url":"https://api.github.com/users/bd-infor/repos","events_url":"https://api.github.com/users/bd-infor/events{/privacy}","received_events_url":"https://api.github.com/users/bd-infor/received_events","type":"User","site_admin":false},"repo":{"id":71166046,"name":"pgjdbc","full_name":"bd-infor/pgjdbc","owner":{"login":"bd-infor","id":22893825,"avatar_url":"https://avatars.githubusercontent.com/u/22893825?v=3","gravatar_id":"","url":"https://api.github.com/users/bd-infor","html_url":"https://github.com/bd-infor","followers_url":"https://api.github.com/users/bd-infor/followers","following_url":"https://api.github.com/users/bd-infor/following{/other_user}","gists_url":"https://api.github.com/users/bd-infor/gists{/gist_id}","starred_url":"https://api.github.com/users/bd-infor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bd-infor/subscriptions","organizations_url":"https://api.github.com/users/bd-infor/orgs","repos_url":"https://api.github.com/users/bd-infor/repos","events_url":"https://api.github.com/users/bd-infor/events{/privacy}","received_events_url":"https://api.github.com/users/bd-infor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bd-infor/pgjdbc","description":"Postgresql JDBC Driver","fork":true,"url":"https://api.github.com/repos/bd-infor/pgjdbc","forks_url":"https://api.github.com/repos/bd-infor/pgjdbc/forks","keys_url":"https://api.github.com/repos/bd-infor/pgjdbc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bd-infor/pgjdbc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bd-infor/pgjdbc/teams","hooks_url":"https://api.github.com/repos/bd-infor/pgjdbc/hooks","issue_events_url":"https://api.github.com/repos/bd-infor/pgjdbc/issues/events{/number}","events_url":"https://api.github.com/repos/bd-infor/pgjdbc/events","assignees_url":"https://api.github.com/repos/bd-infor/pgjdbc/assignees{/user}","branches_url":"https://api.github.com/repos/bd-infor/pgjdbc/branches{/branch}","tags_url":"https://api.github.com/repos/bd-infor/pgjdbc/tags","blobs_url":"https://api.github.com/repos/bd-infor/pgjdbc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bd-infor/pgjdbc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bd-infor/pgjdbc/git/refs{/sha}","trees_url":"https://api.github.com/repos/bd-infor/pgjdbc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bd-infor/pgjdbc/statuses/{sha}","languages_url":"https://api.github.com/repos/bd-infor/pgjdbc/languages","stargazers_url":"https://api.github.com/repos/bd-infor/pgjdbc/stargazers","contributors_url":"https://api.github.com/repos/bd-infor/pgjdbc/contributors","subscribers_url":"https://api.github.com/repos/bd-infor/pgjdbc/subscribers","subscription_url":"https://api.github.com/repos/bd-infor/pgjdbc/subscription","commits_url":"https://api.github.com/repos/bd-infor/pgjdbc/commits{/sha}","git_commits_url":"https://api.github.com/repos/bd-infor/pgjdbc/git/commits{/sha}","comments_url":"https://api.github.com/repos/bd-infor/pgjdbc/comments{/number}","issue_comment_url":"https://api.github.com/repos/bd-infor/pgjdbc/issues/comments{/number}","contents_url":"https://api.github.com/repos/bd-infor/pgjdbc/contents/{+path}","compare_url":"https://api.github.com/repos/bd-infor/pgjdbc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bd-infor/pgjdbc/merges","archive_url":"https://api.github.com/repos/bd-infor/pgjdbc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bd-infor/pgjdbc/downloads","issues_url":"https://api.github.com/repos/bd-infor/pgjdbc/issues{/number}","pulls_url":"https://api.github.com/repos/bd-infor/pgjdbc/pulls{/number}","milestones_url":"https://api.github.com/repos/bd-infor/pgjdbc/milestones{/number}","notifications_url":"https://api.github.com/repos/bd-infor/pgjdbc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bd-infor/pgjdbc/labels{/name}","releases_url":"https://api.github.com/repos/bd-infor/pgjdbc/releases{/id}","deployments_url":"https://api.github.com/repos/bd-infor/pgjdbc/deployments","created_at":"2016-10-17T17:56:37Z","updated_at":"2016-10-17T17:56:39Z","pushed_at":"2016-10-20T19:06:45Z","git_url":"git://github.com/bd-infor/pgjdbc.git","ssh_url":"git@github.com:bd-infor/pgjdbc.git","clone_url":"https://github.com/bd-infor/pgjdbc.git","svn_url":"https://github.com/bd-infor/pgjdbc","homepage":"http://jdbc.postgresql.org","size":13578,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"pgjdbc:master","ref":"master","sha":"b4c90c80795031cfa790b9a589a22da606f50734","user":{"login":"pgjdbc","id":1371956,"avatar_url":"https://avatars.githubusercontent.com/u/1371956?v=3","gravatar_id":"","url":"https://api.github.com/users/pgjdbc","html_url":"https://github.com/pgjdbc","followers_url":"https://api.github.com/users/pgjdbc/followers","following_url":"https://api.github.com/users/pgjdbc/following{/other_user}","gists_url":"https://api.github.com/users/pgjdbc/gists{/gist_id}","starred_url":"https://api.github.com/users/pgjdbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgjdbc/subscriptions","organizations_url":"https://api.github.com/users/pgjdbc/orgs","repos_url":"https://api.github.com/users/pgjdbc/repos","events_url":"https://api.github.com/users/pgjdbc/events{/privacy}","received_events_url":"https://api.github.com/users/pgjdbc/received_events","type":"Organization","site_admin":false},"repo":{"id":3370128,"name":"pgjdbc","full_name":"pgjdbc/pgjdbc","owner":{"login":"pgjdbc","id":1371956,"avatar_url":"https://avatars.githubusercontent.com/u/1371956?v=3","gravatar_id":"","url":"https://api.github.com/users/pgjdbc","html_url":"https://github.com/pgjdbc","followers_url":"https://api.github.com/users/pgjdbc/followers","following_url":"https://api.github.com/users/pgjdbc/following{/other_user}","gists_url":"https://api.github.com/users/pgjdbc/gists{/gist_id}","starred_url":"https://api.github.com/users/pgjdbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgjdbc/subscriptions","organizations_url":"https://api.github.com/users/pgjdbc/orgs","repos_url":"https://api.github.com/users/pgjdbc/repos","events_url":"https://api.github.com/users/pgjdbc/events{/privacy}","received_events_url":"https://api.github.com/users/pgjdbc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pgjdbc/pgjdbc","description":"Postgresql JDBC Driver","fork":false,"url":"https://api.github.com/repos/pgjdbc/pgjdbc","forks_url":"https://api.github.com/repos/pgjdbc/pgjdbc/forks","keys_url":"https://api.github.com/repos/pgjdbc/pgjdbc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pgjdbc/pgjdbc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pgjdbc/pgjdbc/teams","hooks_url":"https://api.github.com/repos/pgjdbc/pgjdbc/hooks","issue_events_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/events{/number}","events_url":"https://api.github.com/repos/pgjdbc/pgjdbc/events","assignees_url":"https://api.github.com/repos/pgjdbc/pgjdbc/assignees{/user}","branches_url":"https://api.github.com/repos/pgjdbc/pgjdbc/branches{/branch}","tags_url":"https://api.github.com/repos/pgjdbc/pgjdbc/tags","blobs_url":"https://api.github.com/repos/pgjdbc/pgjdbc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pgjdbc/pgjdbc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pgjdbc/pgjdbc/git/refs{/sha}","trees_url":"https://api.github.com/repos/pgjdbc/pgjdbc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pgjdbc/pgjdbc/statuses/{sha}","languages_url":"https://api.github.com/repos/pgjdbc/pgjdbc/languages","stargazers_url":"https://api.github.com/repos/pgjdbc/pgjdbc/stargazers","contributors_url":"https://api.github.com/repos/pgjdbc/pgjdbc/contributors","subscribers_url":"https://api.github.com/repos/pgjdbc/pgjdbc/subscribers","subscription_url":"https://api.github.com/repos/pgjdbc/pgjdbc/subscription","commits_url":"https://api.github.com/repos/pgjdbc/pgjdbc/commits{/sha}","git_commits_url":"https://api.github.com/repos/pgjdbc/pgjdbc/git/commits{/sha}","comments_url":"https://api.github.com/repos/pgjdbc/pgjdbc/comments{/number}","issue_comment_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/comments{/number}","contents_url":"https://api.github.com/repos/pgjdbc/pgjdbc/contents/{+path}","compare_url":"https://api.github.com/repos/pgjdbc/pgjdbc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pgjdbc/pgjdbc/merges","archive_url":"https://api.github.com/repos/pgjdbc/pgjdbc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pgjdbc/pgjdbc/downloads","issues_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues{/number}","pulls_url":"https://api.github.com/repos/pgjdbc/pgjdbc/pulls{/number}","milestones_url":"https://api.github.com/repos/pgjdbc/pgjdbc/milestones{/number}","notifications_url":"https://api.github.com/repos/pgjdbc/pgjdbc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pgjdbc/pgjdbc/labels{/name}","releases_url":"https://api.github.com/repos/pgjdbc/pgjdbc/releases{/id}","deployments_url":"https://api.github.com/repos/pgjdbc/pgjdbc/deployments","created_at":"2012-02-06T19:30:35Z","updated_at":"2016-10-18T06:37:10Z","pushed_at":"2016-10-20T20:42:55Z","git_url":"git://github.com/pgjdbc/pgjdbc.git","ssh_url":"git@github.com:pgjdbc/pgjdbc.git","clone_url":"https://github.com/pgjdbc/pgjdbc.git","svn_url":"https://github.com/pgjdbc/pgjdbc","homepage":"http://jdbc.postgresql.org","size":16228,"stargazers_count":263,"watchers_count":263,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":225,"mirror_url":null,"open_issues_count":136,"forks":225,"open_issues":136,"watchers":263,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pgjdbc/pgjdbc/pulls/671"},"html":{"href":"https://github.com/pgjdbc/pgjdbc/pull/671"},"issue":{"href":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/671"},"comments":{"href":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/671/comments"},"review_comments":{"href":"https://api.github.com/repos/pgjdbc/pgjdbc/pulls/671/comments"},"review_comment":{"href":"https://api.github.com/repos/pgjdbc/pgjdbc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pgjdbc/pgjdbc/pulls/671/commits"},"statuses":{"href":"https://api.github.com/repos/pgjdbc/pgjdbc/statuses/7dadc74d682f2d0b8d2029556ada41b6eb3114ce"}}}}
{"actor":{"display_login":"bd-infor"}}