{"action":"created","comment":{"url":"https://api.github.com/repos/codenvy/che-plugins/pulls/comments/39343330","id":39343330,"diff_hunk":"@@ -0,0 +1,70 @@\n+/*******************************************************************************\n+ * Copyright (c) 2012-2015 Codenvy, S.A.\n+ * All rights reserved. This program and the accompanying materials\n+ * are made available under the terms of the Eclipse Public License v1.0\n+ * which accompanies this distribution, and is available at\n+ * http://www.eclipse.org/legal/epl-v10.html\n+ *\n+ * Contributors:\n+ *   Codenvy, S.A. - initial API and implementation\n+ *******************************************************************************/\n+package org.eclipse.che.plugin.docker.client;\n+\n+import com.google.gson.Gson;\n+import com.google.gson.JsonIOException;\n+import com.google.gson.JsonParseException;\n+import com.google.gson.JsonStreamParser;\n+\n+import java.io.IOException;\n+import java.io.InputStream;\n+import java.io.InputStreamReader;\n+import java.io.PushbackInputStream;\n+\n+/**\n+ * Docker daemon sends chunked data in response. One chunk isn't always one JSON object so need to read full chunk at once to be able\n+ * restore JSON object. This reader merges (if needs) few chunks until get full JSON object that we can parse.\n+ *\n+ * @author Alexander Garagatyi\n+ */\n+public class JsonMessageReader<T> {\n+    private static final Gson GSON = new Gson();\n+\n+    private final JsonStreamParser    streamParser;\n+    private final Class<T>            messageClass;\n+    private final PushbackInputStream inputStream;\n+\n+    private boolean firstRead = false;","path":"plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/JsonMessageReader.java","position":36,"original_position":36,"commit_id":"c13f5b89e82a492b36c1014ee29aa7706ed5d523","original_commit_id":"c13f5b89e82a492b36c1014ee29aa7706ed5d523","user":{"login":"evoevodin","id":4053805,"avatar_url":"https://avatars.githubusercontent.com/u/4053805?v=3","gravatar_id":"","url":"https://api.github.com/users/evoevodin","html_url":"https://github.com/evoevodin","followers_url":"https://api.github.com/users/evoevodin/followers","following_url":"https://api.github.com/users/evoevodin/following{/other_user}","gists_url":"https://api.github.com/users/evoevodin/gists{/gist_id}","starred_url":"https://api.github.com/users/evoevodin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evoevodin/subscriptions","organizations_url":"https://api.github.com/users/evoevodin/orgs","repos_url":"https://api.github.com/users/evoevodin/repos","events_url":"https://api.github.com/users/evoevodin/events{/privacy}","received_events_url":"https://api.github.com/users/evoevodin/received_events","type":"User","site_admin":false},"body":"<code>firstRead</code> is always <code>false</code>","created_at":"2015-09-13T01:19:08Z","updated_at":"2015-09-13T01:19:08Z","html_url":"https://github.com/codenvy/che-plugins/pull/242#discussion_r39343330","pull_request_url":"https://api.github.com/repos/codenvy/che-plugins/pulls/242","_links":{"self":{"href":"https://api.github.com/repos/codenvy/che-plugins/pulls/comments/39343330"},"html":{"href":"https://github.com/codenvy/che-plugins/pull/242#discussion_r39343330"},"pull_request":{"href":"https://api.github.com/repos/codenvy/che-plugins/pulls/242"}}},"pull_request":{"url":"https://api.github.com/repos/codenvy/che-plugins/pulls/242","id":44855677,"html_url":"https://github.com/codenvy/che-plugins/pull/242","diff_url":"https://github.com/codenvy/che-plugins/pull/242.diff","patch_url":"https://github.com/codenvy/che-plugins/pull/242.patch","issue_url":"https://api.github.com/repos/codenvy/che-plugins/issues/242","number":242,"state":"open","locked":false,"title":"Idex 2376","user":{"login":"garagatyi","id":1851863,"avatar_url":"https://avatars.githubusercontent.com/u/1851863?v=3","gravatar_id":"","url":"https://api.github.com/users/garagatyi","html_url":"https://github.com/garagatyi","followers_url":"https://api.github.com/users/garagatyi/followers","following_url":"https://api.github.com/users/garagatyi/following{/other_user}","gists_url":"https://api.github.com/users/garagatyi/gists{/gist_id}","starred_url":"https://api.github.com/users/garagatyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garagatyi/subscriptions","organizations_url":"https://api.github.com/users/garagatyi/orgs","repos_url":"https://api.github.com/users/garagatyi/repos","events_url":"https://api.github.com/users/garagatyi/events{/privacy}","received_events_url":"https://api.github.com/users/garagatyi/received_events","type":"User","site_admin":false},"body":"@skabashnyuk @evoevodin @akorneta ","created_at":"2015-09-12T15:57:55Z","updated_at":"2015-09-13T01:19:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af80e46a8f4d3d27bda0f08fddf44bf2ee3f53fe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/codenvy/che-plugins/pulls/242/commits","review_comments_url":"https://api.github.com/repos/codenvy/che-plugins/pulls/242/comments","review_comment_url":"https://api.github.com/repos/codenvy/che-plugins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codenvy/che-plugins/issues/242/comments","statuses_url":"https://api.github.com/repos/codenvy/che-plugins/statuses/c13f5b89e82a492b36c1014ee29aa7706ed5d523","head":{"label":"codenvy:IDEX-2376","ref":"IDEX-2376","sha":"c13f5b89e82a492b36c1014ee29aa7706ed5d523","user":{"login":"codenvy","id":2736247,"avatar_url":"https://avatars.githubusercontent.com/u/2736247?v=3","gravatar_id":"","url":"https://api.github.com/users/codenvy","html_url":"https://github.com/codenvy","followers_url":"https://api.github.com/users/codenvy/followers","following_url":"https://api.github.com/users/codenvy/following{/other_user}","gists_url":"https://api.github.com/users/codenvy/gists{/gist_id}","starred_url":"https://api.github.com/users/codenvy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codenvy/subscriptions","organizations_url":"https://api.github.com/users/codenvy/orgs","repos_url":"https://api.github.com/users/codenvy/repos","events_url":"https://api.github.com/users/codenvy/events{/privacy}","received_events_url":"https://api.github.com/users/codenvy/received_events","type":"Organization","site_admin":false},"repo":{"id":32935729,"name":"che-plugins","full_name":"codenvy/che-plugins","owner":{"login":"codenvy","id":2736247,"avatar_url":"https://avatars.githubusercontent.com/u/2736247?v=3","gravatar_id":"","url":"https://api.github.com/users/codenvy","html_url":"https://github.com/codenvy","followers_url":"https://api.github.com/users/codenvy/followers","following_url":"https://api.github.com/users/codenvy/following{/other_user}","gists_url":"https://api.github.com/users/codenvy/gists{/gist_id}","starred_url":"https://api.github.com/users/codenvy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codenvy/subscriptions","organizations_url":"https://api.github.com/users/codenvy/orgs","repos_url":"https://api.github.com/users/codenvy/repos","events_url":"https://api.github.com/users/codenvy/events{/privacy}","received_events_url":"https://api.github.com/users/codenvy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codenvy/che-plugins","description":"Plugins for che","fork":false,"url":"https://api.github.com/repos/codenvy/che-plugins","forks_url":"https://api.github.com/repos/codenvy/che-plugins/forks","keys_url":"https://api.github.com/repos/codenvy/che-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codenvy/che-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codenvy/che-plugins/teams","hooks_url":"https://api.github.com/repos/codenvy/che-plugins/hooks","issue_events_url":"https://api.github.com/repos/codenvy/che-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/codenvy/che-plugins/events","assignees_url":"https://api.github.com/repos/codenvy/che-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/codenvy/che-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/codenvy/che-plugins/tags","blobs_url":"https://api.github.com/repos/codenvy/che-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codenvy/che-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codenvy/che-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/codenvy/che-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codenvy/che-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/codenvy/che-plugins/languages","stargazers_url":"https://api.github.com/repos/codenvy/che-plugins/stargazers","contributors_url":"https://api.github.com/repos/codenvy/che-plugins/contributors","subscribers_url":"https://api.github.com/repos/codenvy/che-plugins/subscribers","subscription_url":"https://api.github.com/repos/codenvy/che-plugins/subscription","commits_url":"https://api.github.com/repos/codenvy/che-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/codenvy/che-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/codenvy/che-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/codenvy/che-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/codenvy/che-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/codenvy/che-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codenvy/che-plugins/merges","archive_url":"https://api.github.com/repos/codenvy/che-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codenvy/che-plugins/downloads","issues_url":"https://api.github.com/repos/codenvy/che-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/codenvy/che-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/codenvy/che-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/codenvy/che-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codenvy/che-plugins/labels{/name}","releases_url":"https://api.github.com/repos/codenvy/che-plugins/releases{/id}","created_at":"2015-03-26T15:30:37Z","updated_at":"2015-09-08T03:20:21Z","pushed_at":"2015-09-12T16:00:34Z","git_url":"git://github.com/codenvy/che-plugins.git","ssh_url":"git@github.com:codenvy/che-plugins.git","clone_url":"https://github.com/codenvy/che-plugins.git","svn_url":"https://github.com/codenvy/che-plugins","homepage":null,"size":24098,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":8,"forks":14,"open_issues":8,"watchers":6,"default_branch":"master"}},"base":{"label":"codenvy:4.0","ref":"4.0","sha":"22d2dec354abe366acfad634b09f63d51246ebdc","user":{"login":"codenvy","id":2736247,"avatar_url":"https://avatars.githubusercontent.com/u/2736247?v=3","gravatar_id":"","url":"https://api.github.com/users/codenvy","html_url":"https://github.com/codenvy","followers_url":"https://api.github.com/users/codenvy/followers","following_url":"https://api.github.com/users/codenvy/following{/other_user}","gists_url":"https://api.github.com/users/codenvy/gists{/gist_id}","starred_url":"https://api.github.com/users/codenvy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codenvy/subscriptions","organizations_url":"https://api.github.com/users/codenvy/orgs","repos_url":"https://api.github.com/users/codenvy/repos","events_url":"https://api.github.com/users/codenvy/events{/privacy}","received_events_url":"https://api.github.com/users/codenvy/received_events","type":"Organization","site_admin":false},"repo":{"id":32935729,"name":"che-plugins","full_name":"codenvy/che-plugins","owner":{"login":"codenvy","id":2736247,"avatar_url":"https://avatars.githubusercontent.com/u/2736247?v=3","gravatar_id":"","url":"https://api.github.com/users/codenvy","html_url":"https://github.com/codenvy","followers_url":"https://api.github.com/users/codenvy/followers","following_url":"https://api.github.com/users/codenvy/following{/other_user}","gists_url":"https://api.github.com/users/codenvy/gists{/gist_id}","starred_url":"https://api.github.com/users/codenvy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codenvy/subscriptions","organizations_url":"https://api.github.com/users/codenvy/orgs","repos_url":"https://api.github.com/users/codenvy/repos","events_url":"https://api.github.com/users/codenvy/events{/privacy}","received_events_url":"https://api.github.com/users/codenvy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codenvy/che-plugins","description":"Plugins for che","fork":false,"url":"https://api.github.com/repos/codenvy/che-plugins","forks_url":"https://api.github.com/repos/codenvy/che-plugins/forks","keys_url":"https://api.github.com/repos/codenvy/che-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codenvy/che-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codenvy/che-plugins/teams","hooks_url":"https://api.github.com/repos/codenvy/che-plugins/hooks","issue_events_url":"https://api.github.com/repos/codenvy/che-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/codenvy/che-plugins/events","assignees_url":"https://api.github.com/repos/codenvy/che-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/codenvy/che-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/codenvy/che-plugins/tags","blobs_url":"https://api.github.com/repos/codenvy/che-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codenvy/che-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codenvy/che-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/codenvy/che-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codenvy/che-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/codenvy/che-plugins/languages","stargazers_url":"https://api.github.com/repos/codenvy/che-plugins/stargazers","contributors_url":"https://api.github.com/repos/codenvy/che-plugins/contributors","subscribers_url":"https://api.github.com/repos/codenvy/che-plugins/subscribers","subscription_url":"https://api.github.com/repos/codenvy/che-plugins/subscription","commits_url":"https://api.github.com/repos/codenvy/che-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/codenvy/che-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/codenvy/che-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/codenvy/che-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/codenvy/che-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/codenvy/che-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codenvy/che-plugins/merges","archive_url":"https://api.github.com/repos/codenvy/che-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codenvy/che-plugins/downloads","issues_url":"https://api.github.com/repos/codenvy/che-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/codenvy/che-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/codenvy/che-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/codenvy/che-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codenvy/che-plugins/labels{/name}","releases_url":"https://api.github.com/repos/codenvy/che-plugins/releases{/id}","created_at":"2015-03-26T15:30:37Z","updated_at":"2015-09-08T03:20:21Z","pushed_at":"2015-09-12T16:00:34Z","git_url":"git://github.com/codenvy/che-plugins.git","ssh_url":"git@github.com:codenvy/che-plugins.git","clone_url":"https://github.com/codenvy/che-plugins.git","svn_url":"https://github.com/codenvy/che-plugins","homepage":null,"size":24098,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":8,"forks":14,"open_issues":8,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codenvy/che-plugins/pulls/242"},"html":{"href":"https://github.com/codenvy/che-plugins/pull/242"},"issue":{"href":"https://api.github.com/repos/codenvy/che-plugins/issues/242"},"comments":{"href":"https://api.github.com/repos/codenvy/che-plugins/issues/242/comments"},"review_comments":{"href":"https://api.github.com/repos/codenvy/che-plugins/pulls/242/comments"},"review_comment":{"href":"https://api.github.com/repos/codenvy/che-plugins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codenvy/che-plugins/pulls/242/commits"},"statuses":{"href":"https://api.github.com/repos/codenvy/che-plugins/statuses/c13f5b89e82a492b36c1014ee29aa7706ed5d523"}}}}