{"action":"created","comment":{"url":"https://api.github.com/repos/matobet/moVirt/pulls/comments/85753254","pull_request_review_id":6449759,"id":85753254,"diff_hunk":"@@ -0,0 +1,121 @@\n+package org.ovirt.mobile.movirt.rest;\n+\n+/**\n+ * Created by suomiy on 10/17/16.\n+ */\n+\n+import android.util.Log;\n+\n+import org.ovirt.mobile.movirt.model.ConsoleProtocol;\n+import org.ovirt.mobile.movirt.rest.dto.ConsoleConnectionDetails;\n+import org.springframework.http.HttpInputMessage;\n+import org.springframework.http.HttpOutputMessage;\n+import org.springframework.http.MediaType;\n+import org.springframework.http.converter.AbstractHttpMessageConverter;\n+import org.springframework.http.converter.HttpMessageNotReadableException;\n+import org.springframework.http.converter.HttpMessageNotWritableException;\n+\n+import java.io.IOException;\n+import java.io.InputStream;\n+import java.nio.charset.Charset;\n+import java.util.HashMap;\n+import java.util.Map;\n+import java.util.Scanner;\n+import java.util.regex.MatchResult;\n+import java.util.regex.Matcher;\n+import java.util.regex.Pattern;\n+\n+public class VvFileHttpMessageConverter extends AbstractHttpMessageConverter<Object> {\n+    private static final String TAG = VvFileHttpMessageConverter.class.getSimpleName();\n+\n+    public static final Charset DEFAULT_CHARSET = Charset.forName(\"UTF-8\");\n+    public static final String X_VIRT_VIEWER_MEDIA_TYPE = \"application/x-virt-viewer\";\n+\n+    public VvFileHttpMessageConverter() {\n+        super(new MediaType(\"application\", \"x-virt-viewer\", DEFAULT_CHARSET));\n+    }\n+\n+    @Override\n+    protected Object readInternal(Class<? extends Object> clazz,\n+                                  HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException {\n+        Object result = null;\n+        InputStream inputStream = inputMessage.getBody();\n+        try {\n+            result = convertStreamToConsoleConnectionDetails(inputStream);\n+        } finally {\n+            if (inputStream != null) {","path":"moVirt/src/main/java/org/ovirt/mobile/movirt/rest/VvFileHttpMessageConverter.java","position":46,"original_position":46,"commit_id":"f9a2b1de9282dd6c92941d7fb19a019d288650f8","original_commit_id":"9a058988214bfee6cf86a930c93002289475a6a5","user":{"login":"suomiy","id":3648838,"avatar_url":"https://avatars.githubusercontent.com/u/3648838?v=3","gravatar_id":"","url":"https://api.github.com/users/suomiy","html_url":"https://github.com/suomiy","followers_url":"https://api.github.com/users/suomiy/followers","following_url":"https://api.github.com/users/suomiy/following{/other_user}","gists_url":"https://api.github.com/users/suomiy/gists{/gist_id}","starred_url":"https://api.github.com/users/suomiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suomiy/subscriptions","organizations_url":"https://api.github.com/users/suomiy/orgs","repos_url":"https://api.github.com/users/suomiy/repos","events_url":"https://api.github.com/users/suomiy/events{/privacy}","received_events_url":"https://api.github.com/users/suomiy/received_events","type":"User","site_admin":false},"body":"NPE will occur, that means whole request will fail and an error window will be shown with this NPE","created_at":"2016-10-31T14:48:15Z","updated_at":"2016-10-31T14:51:39Z","html_url":"https://github.com/matobet/moVirt/pull/203#discussion_r85753254","pull_request_url":"https://api.github.com/repos/matobet/moVirt/pulls/203","_links":{"self":{"href":"https://api.github.com/repos/matobet/moVirt/pulls/comments/85753254"},"html":{"href":"https://github.com/matobet/moVirt/pull/203#discussion_r85753254"},"pull_request":{"href":"https://api.github.com/repos/matobet/moVirt/pulls/203"}}},"pull_request":{"url":"https://api.github.com/repos/matobet/moVirt/pulls/203","id":90595097,"html_url":"https://github.com/matobet/moVirt/pull/203","diff_url":"https://github.com/matobet/moVirt/pull/203.diff","patch_url":"https://github.com/matobet/moVirt/pull/203.patch","issue_url":"https://api.github.com/repos/matobet/moVirt/issues/203","number":203,"state":"open","locked":false,"title":"Changed consoles to use .vv files + refactoring","user":{"login":"suomiy","id":3648838,"avatar_url":"https://avatars.githubusercontent.com/u/3648838?v=3","gravatar_id":"","url":"https://api.github.com/users/suomiy","html_url":"https://github.com/suomiy","followers_url":"https://api.github.com/users/suomiy/followers","following_url":"https://api.github.com/users/suomiy/following{/other_user}","gists_url":"https://api.github.com/users/suomiy/gists{/gist_id}","starred_url":"https://api.github.com/users/suomiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suomiy/subscriptions","organizations_url":"https://api.github.com/users/suomiy/orgs","repos_url":"https://api.github.com/users/suomiy/repos","events_url":"https://api.github.com/users/suomiy/events{/privacy}","received_events_url":"https://api.github.com/users/suomiy/received_events","type":"User","site_admin":false},"body":"<!-- Reviewable:start -->\n\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/matobet/movirt/203)\n\n<!-- Reviewable:end -->\n","created_at":"2016-10-24T11:36:00Z","updated_at":"2016-10-31T14:51:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2bf61e1b1123bd769e87355f628c1fd1396147d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/matobet/moVirt/pulls/203/commits","review_comments_url":"https://api.github.com/repos/matobet/moVirt/pulls/203/comments","review_comment_url":"https://api.github.com/repos/matobet/moVirt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matobet/moVirt/issues/203/comments","statuses_url":"https://api.github.com/repos/matobet/moVirt/statuses/f9a2b1de9282dd6c92941d7fb19a019d288650f8","head":{"label":"suomiy:consoles","ref":"consoles","sha":"f9a2b1de9282dd6c92941d7fb19a019d288650f8","user":{"login":"suomiy","id":3648838,"avatar_url":"https://avatars.githubusercontent.com/u/3648838?v=3","gravatar_id":"","url":"https://api.github.com/users/suomiy","html_url":"https://github.com/suomiy","followers_url":"https://api.github.com/users/suomiy/followers","following_url":"https://api.github.com/users/suomiy/following{/other_user}","gists_url":"https://api.github.com/users/suomiy/gists{/gist_id}","starred_url":"https://api.github.com/users/suomiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suomiy/subscriptions","organizations_url":"https://api.github.com/users/suomiy/orgs","repos_url":"https://api.github.com/users/suomiy/repos","events_url":"https://api.github.com/users/suomiy/events{/privacy}","received_events_url":"https://api.github.com/users/suomiy/received_events","type":"User","site_admin":false},"repo":{"id":45982599,"name":"moVirt","full_name":"suomiy/moVirt","owner":{"login":"suomiy","id":3648838,"avatar_url":"https://avatars.githubusercontent.com/u/3648838?v=3","gravatar_id":"","url":"https://api.github.com/users/suomiy","html_url":"https://github.com/suomiy","followers_url":"https://api.github.com/users/suomiy/followers","following_url":"https://api.github.com/users/suomiy/following{/other_user}","gists_url":"https://api.github.com/users/suomiy/gists{/gist_id}","starred_url":"https://api.github.com/users/suomiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suomiy/subscriptions","organizations_url":"https://api.github.com/users/suomiy/orgs","repos_url":"https://api.github.com/users/suomiy/repos","events_url":"https://api.github.com/users/suomiy/events{/privacy}","received_events_url":"https://api.github.com/users/suomiy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/suomiy/moVirt","description":"A mobile client for oVirt","fork":true,"url":"https://api.github.com/repos/suomiy/moVirt","forks_url":"https://api.github.com/repos/suomiy/moVirt/forks","keys_url":"https://api.github.com/repos/suomiy/moVirt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/suomiy/moVirt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/suomiy/moVirt/teams","hooks_url":"https://api.github.com/repos/suomiy/moVirt/hooks","issue_events_url":"https://api.github.com/repos/suomiy/moVirt/issues/events{/number}","events_url":"https://api.github.com/repos/suomiy/moVirt/events","assignees_url":"https://api.github.com/repos/suomiy/moVirt/assignees{/user}","branches_url":"https://api.github.com/repos/suomiy/moVirt/branches{/branch}","tags_url":"https://api.github.com/repos/suomiy/moVirt/tags","blobs_url":"https://api.github.com/repos/suomiy/moVirt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/suomiy/moVirt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/suomiy/moVirt/git/refs{/sha}","trees_url":"https://api.github.com/repos/suomiy/moVirt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/suomiy/moVirt/statuses/{sha}","languages_url":"https://api.github.com/repos/suomiy/moVirt/languages","stargazers_url":"https://api.github.com/repos/suomiy/moVirt/stargazers","contributors_url":"https://api.github.com/repos/suomiy/moVirt/contributors","subscribers_url":"https://api.github.com/repos/suomiy/moVirt/subscribers","subscription_url":"https://api.github.com/repos/suomiy/moVirt/subscription","commits_url":"https://api.github.com/repos/suomiy/moVirt/commits{/sha}","git_commits_url":"https://api.github.com/repos/suomiy/moVirt/git/commits{/sha}","comments_url":"https://api.github.com/repos/suomiy/moVirt/comments{/number}","issue_comment_url":"https://api.github.com/repos/suomiy/moVirt/issues/comments{/number}","contents_url":"https://api.github.com/repos/suomiy/moVirt/contents/{+path}","compare_url":"https://api.github.com/repos/suomiy/moVirt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/suomiy/moVirt/merges","archive_url":"https://api.github.com/repos/suomiy/moVirt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/suomiy/moVirt/downloads","issues_url":"https://api.github.com/repos/suomiy/moVirt/issues{/number}","pulls_url":"https://api.github.com/repos/suomiy/moVirt/pulls{/number}","milestones_url":"https://api.github.com/repos/suomiy/moVirt/milestones{/number}","notifications_url":"https://api.github.com/repos/suomiy/moVirt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/suomiy/moVirt/labels{/name}","releases_url":"https://api.github.com/repos/suomiy/moVirt/releases{/id}","deployments_url":"https://api.github.com/repos/suomiy/moVirt/deployments","created_at":"2015-11-11T13:13:56Z","updated_at":"2016-01-13T17:40:09Z","pushed_at":"2016-10-24T14:58:53Z","git_url":"git://github.com/suomiy/moVirt.git","ssh_url":"git@github.com:suomiy/moVirt.git","clone_url":"https://github.com/suomiy/moVirt.git","svn_url":"https://github.com/suomiy/moVirt","homepage":null,"size":62647,"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":"matobet:master","ref":"master","sha":"645a6306346164f809f22c91c36c7072b2c2b916","user":{"login":"matobet","id":1173428,"avatar_url":"https://avatars.githubusercontent.com/u/1173428?v=3","gravatar_id":"","url":"https://api.github.com/users/matobet","html_url":"https://github.com/matobet","followers_url":"https://api.github.com/users/matobet/followers","following_url":"https://api.github.com/users/matobet/following{/other_user}","gists_url":"https://api.github.com/users/matobet/gists{/gist_id}","starred_url":"https://api.github.com/users/matobet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matobet/subscriptions","organizations_url":"https://api.github.com/users/matobet/orgs","repos_url":"https://api.github.com/users/matobet/repos","events_url":"https://api.github.com/users/matobet/events{/privacy}","received_events_url":"https://api.github.com/users/matobet/received_events","type":"User","site_admin":false},"repo":{"id":13483826,"name":"moVirt","full_name":"matobet/moVirt","owner":{"login":"matobet","id":1173428,"avatar_url":"https://avatars.githubusercontent.com/u/1173428?v=3","gravatar_id":"","url":"https://api.github.com/users/matobet","html_url":"https://github.com/matobet","followers_url":"https://api.github.com/users/matobet/followers","following_url":"https://api.github.com/users/matobet/following{/other_user}","gists_url":"https://api.github.com/users/matobet/gists{/gist_id}","starred_url":"https://api.github.com/users/matobet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matobet/subscriptions","organizations_url":"https://api.github.com/users/matobet/orgs","repos_url":"https://api.github.com/users/matobet/repos","events_url":"https://api.github.com/users/matobet/events{/privacy}","received_events_url":"https://api.github.com/users/matobet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matobet/moVirt","description":"A mobile client for oVirt","fork":false,"url":"https://api.github.com/repos/matobet/moVirt","forks_url":"https://api.github.com/repos/matobet/moVirt/forks","keys_url":"https://api.github.com/repos/matobet/moVirt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matobet/moVirt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matobet/moVirt/teams","hooks_url":"https://api.github.com/repos/matobet/moVirt/hooks","issue_events_url":"https://api.github.com/repos/matobet/moVirt/issues/events{/number}","events_url":"https://api.github.com/repos/matobet/moVirt/events","assignees_url":"https://api.github.com/repos/matobet/moVirt/assignees{/user}","branches_url":"https://api.github.com/repos/matobet/moVirt/branches{/branch}","tags_url":"https://api.github.com/repos/matobet/moVirt/tags","blobs_url":"https://api.github.com/repos/matobet/moVirt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matobet/moVirt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matobet/moVirt/git/refs{/sha}","trees_url":"https://api.github.com/repos/matobet/moVirt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matobet/moVirt/statuses/{sha}","languages_url":"https://api.github.com/repos/matobet/moVirt/languages","stargazers_url":"https://api.github.com/repos/matobet/moVirt/stargazers","contributors_url":"https://api.github.com/repos/matobet/moVirt/contributors","subscribers_url":"https://api.github.com/repos/matobet/moVirt/subscribers","subscription_url":"https://api.github.com/repos/matobet/moVirt/subscription","commits_url":"https://api.github.com/repos/matobet/moVirt/commits{/sha}","git_commits_url":"https://api.github.com/repos/matobet/moVirt/git/commits{/sha}","comments_url":"https://api.github.com/repos/matobet/moVirt/comments{/number}","issue_comment_url":"https://api.github.com/repos/matobet/moVirt/issues/comments{/number}","contents_url":"https://api.github.com/repos/matobet/moVirt/contents/{+path}","compare_url":"https://api.github.com/repos/matobet/moVirt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matobet/moVirt/merges","archive_url":"https://api.github.com/repos/matobet/moVirt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matobet/moVirt/downloads","issues_url":"https://api.github.com/repos/matobet/moVirt/issues{/number}","pulls_url":"https://api.github.com/repos/matobet/moVirt/pulls{/number}","milestones_url":"https://api.github.com/repos/matobet/moVirt/milestones{/number}","notifications_url":"https://api.github.com/repos/matobet/moVirt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matobet/moVirt/labels{/name}","releases_url":"https://api.github.com/repos/matobet/moVirt/releases{/id}","deployments_url":"https://api.github.com/repos/matobet/moVirt/deployments","created_at":"2013-10-10T21:49:01Z","updated_at":"2016-10-24T11:11:18Z","pushed_at":"2016-10-24T14:58:58Z","git_url":"git://github.com/matobet/moVirt.git","ssh_url":"git@github.com:matobet/moVirt.git","clone_url":"https://github.com/matobet/moVirt.git","svn_url":"https://github.com/matobet/moVirt","homepage":null,"size":63058,"stargazers_count":28,"watchers_count":28,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":32,"forks":17,"open_issues":32,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matobet/moVirt/pulls/203"},"html":{"href":"https://github.com/matobet/moVirt/pull/203"},"issue":{"href":"https://api.github.com/repos/matobet/moVirt/issues/203"},"comments":{"href":"https://api.github.com/repos/matobet/moVirt/issues/203/comments"},"review_comments":{"href":"https://api.github.com/repos/matobet/moVirt/pulls/203/comments"},"review_comment":{"href":"https://api.github.com/repos/matobet/moVirt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matobet/moVirt/pulls/203/commits"},"statuses":{"href":"https://api.github.com/repos/matobet/moVirt/statuses/f9a2b1de9282dd6c92941d7fb19a019d288650f8"}}}}
{"actor":{"display_login":"suomiy"}}