{"action":"created","comment":{"url":"https://api.github.com/repos/Talend/components/pulls/comments/84057495","pull_request_review_id":4858111,"id":84057495,"diff_hunk":"@@ -1,33 +1,68 @@\n package org.talend.components.filedelimited.runtime;\n \n-import java.io.BufferedWriter;\n import java.io.IOException;\n import java.io.Writer;\n \n /*\n- * Implement the function of routines.system.BufferedOutput which we can't be used here\n+ * Copy from routines.system.BufferedOutput which is rewrite based on java.io.BufferedWriter\n  */\n-public class BufferedOutput extends BufferedWriter {\n+\n+public class BufferedOutput extends java.io.Writer {\n \n     private Writer out;\n \n     private char cb[];\n \n     private int nChars, nextChar;\n \n+    private static int defaultCharBufferSize = 8192;\n+\n+    /**\n+     * Line separator string. This is the value of the line.separator property at the moment that the stream was\n+     * created.\n+     */\n+    private String lineSeparator;\n+\n+    /**\n+     * Create a buffered character-output stream that uses a default-sized output buffer.\n+     *\n+     * @param out A Writer\n+     */\n     public BufferedOutput(Writer out) {\n-        super(out);\n+        this(out, defaultCharBufferSize);\n     }\n \n+    /**\n+     * Create a new buffered character-output stream that uses an output buffer of the given size.\n+     *\n+     * @param out A Writer\n+     * @param sz Output-buffer size, a positive integer\n+     *\n+     * @exception IllegalArgumentException If sz is <= 0\n+     */\n     public BufferedOutput(Writer out, int sz) {\n-        super(out, sz);\n+        super(out);\n+        if (sz <= 0)\n+            throw new IllegalArgumentException(\"Buffer size <= 0\"); //$NON-NLS-1$\n+        this.out = out;\n+        cb = new char[sz];\n+        nChars = sz;\n+        nextChar = 0;\n+\n+        lineSeparator = (String) java.security.AccessController\n+                .doPrivileged(new sun.security.action.GetPropertyAction(\"line.separator\")); //$NON-NLS-1$","path":"components-filedelimited/src/main/java/org/talend/components/filedelimited/runtime/BufferedOutput.java","position":58,"original_position":58,"commit_id":"5229f50a10aba6c035c15a9692aba4de22acfeb2","original_commit_id":"5229f50a10aba6c035c15a9692aba4de22acfeb2","user":{"login":"jzhao-talend","id":7733973,"avatar_url":"https://avatars.githubusercontent.com/u/7733973?v=3","gravatar_id":"","url":"https://api.github.com/users/jzhao-talend","html_url":"https://github.com/jzhao-talend","followers_url":"https://api.github.com/users/jzhao-talend/followers","following_url":"https://api.github.com/users/jzhao-talend/following{/other_user}","gists_url":"https://api.github.com/users/jzhao-talend/gists{/gist_id}","starred_url":"https://api.github.com/users/jzhao-talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzhao-talend/subscriptions","organizations_url":"https://api.github.com/users/jzhao-talend/orgs","repos_url":"https://api.github.com/users/jzhao-talend/repos","events_url":"https://api.github.com/users/jzhao-talend/events{/privacy}","received_events_url":"https://api.github.com/users/jzhao-talend/received_events","type":"User","site_admin":false},"body":"@sgandon \r\nhttps://github.com/Talend/daikon/pull/71\r\nI have add a pull request to move BufferedOutput to daikon.\r\nNeed to review and merge it firstly. \r\nand then I would push the changes of components side.","created_at":"2016-10-19T12:25:37Z","updated_at":"2016-10-19T12:25:37Z","html_url":"https://github.com/Talend/components/pull/265#discussion_r84057495","pull_request_url":"https://api.github.com/repos/Talend/components/pulls/265","_links":{"self":{"href":"https://api.github.com/repos/Talend/components/pulls/comments/84057495"},"html":{"href":"https://github.com/Talend/components/pull/265#discussion_r84057495"},"pull_request":{"href":"https://api.github.com/repos/Talend/components/pulls/265"}}},"pull_request":{"url":"https://api.github.com/repos/Talend/components/pulls/265","id":89746900,"html_url":"https://github.com/Talend/components/pull/265","diff_url":"https://github.com/Talend/components/pull/265.diff","patch_url":"https://github.com/Talend/components/pull/265.patch","issue_url":"https://api.github.com/repos/Talend/components/issues/265","number":265,"state":"open","locked":false,"title":"fix (TDI-37583): fileoutputdelimited check \"row mode throw \"Stream closed\" exception","user":{"login":"jzhao-talend","id":7733973,"avatar_url":"https://avatars.githubusercontent.com/u/7733973?v=3","gravatar_id":"","url":"https://api.github.com/users/jzhao-talend","html_url":"https://github.com/jzhao-talend","followers_url":"https://api.github.com/users/jzhao-talend/followers","following_url":"https://api.github.com/users/jzhao-talend/following{/other_user}","gists_url":"https://api.github.com/users/jzhao-talend/gists{/gist_id}","starred_url":"https://api.github.com/users/jzhao-talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzhao-talend/subscriptions","organizations_url":"https://api.github.com/users/jzhao-talend/orgs","repos_url":"https://api.github.com/users/jzhao-talend/repos","events_url":"https://api.github.com/users/jzhao-talend/events{/privacy}","received_events_url":"https://api.github.com/users/jzhao-talend/received_events","type":"User","site_admin":false},"body":"**Please check if the PR fulfills these requirements**\r\n\r\n- [x] The commit message follows Talend standard\r\n- [x] Tests for the changes have been added (for bug fixes / features)\r\n\r\n**What is the current behavior?** (You can also link to an open issue here)\r\nwhen fileoutputdelimited check \"row mode to write data, it would throw \"Stream closed\" exception\r\nBecause of BufferedOutputwrong implement.\r\n\r\n**What is the new behavior?**\r\nChange the BufferedOutput implement, Keep the same with before.\r\nMeans copy it form [routines.system.BufferedOutput](https://github.com/Talend/tcommon-studio-se/blob/master/main/plugins/org.talend.librariesmanager/resources/java/routines/system/BufferedOutput.java) which is rewrite from java.io.BufferedWriter \r\n\r\n\r\n**Does this PR introduce a breaking change?**\r\n\r\n- [x] No\r\n","created_at":"2016-10-18T04:55:26Z","updated_at":"2016-10-19T12:25:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c85e4a736e04a52bfb53d5415d802b7cfc71983","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Talend/components/pulls/265/commits","review_comments_url":"https://api.github.com/repos/Talend/components/pulls/265/comments","review_comment_url":"https://api.github.com/repos/Talend/components/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Talend/components/issues/265/comments","statuses_url":"https://api.github.com/repos/Talend/components/statuses/5229f50a10aba6c035c15a9692aba4de22acfeb2","head":{"label":"Talend:bugfix/6.3/TDI-37525_tfileoutputdelimited_rowMode_issue","ref":"bugfix/6.3/TDI-37525_tfileoutputdelimited_rowMode_issue","sha":"5229f50a10aba6c035c15a9692aba4de22acfeb2","user":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"repo":{"id":39855061,"name":"components","full_name":"Talend/components","owner":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Talend/components","description":"Talend component infrastructure and public components","fork":false,"url":"https://api.github.com/repos/Talend/components","forks_url":"https://api.github.com/repos/Talend/components/forks","keys_url":"https://api.github.com/repos/Talend/components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/components/teams","hooks_url":"https://api.github.com/repos/Talend/components/hooks","issue_events_url":"https://api.github.com/repos/Talend/components/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/components/events","assignees_url":"https://api.github.com/repos/Talend/components/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/components/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/components/tags","blobs_url":"https://api.github.com/repos/Talend/components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/components/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/components/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/components/languages","stargazers_url":"https://api.github.com/repos/Talend/components/stargazers","contributors_url":"https://api.github.com/repos/Talend/components/contributors","subscribers_url":"https://api.github.com/repos/Talend/components/subscribers","subscription_url":"https://api.github.com/repos/Talend/components/subscription","commits_url":"https://api.github.com/repos/Talend/components/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/components/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/components/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/components/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/components/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/components/merges","archive_url":"https://api.github.com/repos/Talend/components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/components/downloads","issues_url":"https://api.github.com/repos/Talend/components/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/components/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/components/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/components/labels{/name}","releases_url":"https://api.github.com/repos/Talend/components/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/components/deployments","created_at":"2015-07-28T20:02:50Z","updated_at":"2016-10-12T07:34:38Z","pushed_at":"2016-10-19T10:48:15Z","git_url":"git://github.com/Talend/components.git","ssh_url":"git@github.com:Talend/components.git","clone_url":"https://github.com/Talend/components.git","svn_url":"https://github.com/Talend/components","homepage":null,"size":6172,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":15,"forks":17,"open_issues":15,"watchers":6,"default_branch":"master"}},"base":{"label":"Talend:master","ref":"master","sha":"51723851bd1bbd99ef1e91d0945f2c122ae39804","user":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"repo":{"id":39855061,"name":"components","full_name":"Talend/components","owner":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Talend/components","description":"Talend component infrastructure and public components","fork":false,"url":"https://api.github.com/repos/Talend/components","forks_url":"https://api.github.com/repos/Talend/components/forks","keys_url":"https://api.github.com/repos/Talend/components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/components/teams","hooks_url":"https://api.github.com/repos/Talend/components/hooks","issue_events_url":"https://api.github.com/repos/Talend/components/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/components/events","assignees_url":"https://api.github.com/repos/Talend/components/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/components/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/components/tags","blobs_url":"https://api.github.com/repos/Talend/components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/components/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/components/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/components/languages","stargazers_url":"https://api.github.com/repos/Talend/components/stargazers","contributors_url":"https://api.github.com/repos/Talend/components/contributors","subscribers_url":"https://api.github.com/repos/Talend/components/subscribers","subscription_url":"https://api.github.com/repos/Talend/components/subscription","commits_url":"https://api.github.com/repos/Talend/components/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/components/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/components/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/components/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/components/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/components/merges","archive_url":"https://api.github.com/repos/Talend/components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/components/downloads","issues_url":"https://api.github.com/repos/Talend/components/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/components/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/components/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/components/labels{/name}","releases_url":"https://api.github.com/repos/Talend/components/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/components/deployments","created_at":"2015-07-28T20:02:50Z","updated_at":"2016-10-12T07:34:38Z","pushed_at":"2016-10-19T10:48:15Z","git_url":"git://github.com/Talend/components.git","ssh_url":"git@github.com:Talend/components.git","clone_url":"https://github.com/Talend/components.git","svn_url":"https://github.com/Talend/components","homepage":null,"size":6172,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":15,"forks":17,"open_issues":15,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Talend/components/pulls/265"},"html":{"href":"https://github.com/Talend/components/pull/265"},"issue":{"href":"https://api.github.com/repos/Talend/components/issues/265"},"comments":{"href":"https://api.github.com/repos/Talend/components/issues/265/comments"},"review_comments":{"href":"https://api.github.com/repos/Talend/components/pulls/265/comments"},"review_comment":{"href":"https://api.github.com/repos/Talend/components/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Talend/components/pulls/265/commits"},"statuses":{"href":"https://api.github.com/repos/Talend/components/statuses/5229f50a10aba6c035c15a9692aba4de22acfeb2"}}}}
{"actor":{"display_login":"jzhao-talend"}}