{"action":"created","comment":{"url":"https://api.github.com/repos/akvo/akvo-flow-mobile/pulls/comments/97589914","pull_request_review_id":18204030,"id":97589914,"diff_hunk":"@@ -0,0 +1,325 @@\n+/*\n+* Copyright (C) 2010-2017 Stichting Akvo (Akvo Foundation)","path":"app/src/main/java/org/akvo/flow/util/InternetDataConnection.java","position":2,"original_position":2,"commit_id":"521444cb371dc67e79564b5a85cdd82ba77a43b1","original_commit_id":"e464405b6486c59cbf31a4e6582de5f361396674","user":{"login":"muloem","id":533336,"avatar_url":"https://avatars.githubusercontent.com/u/533336?v=3","gravatar_id":"","url":"https://api.github.com/users/muloem","html_url":"https://github.com/muloem","followers_url":"https://api.github.com/users/muloem/followers","following_url":"https://api.github.com/users/muloem/following{/other_user}","gists_url":"https://api.github.com/users/muloem/gists{/gist_id}","starred_url":"https://api.github.com/users/muloem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muloem/subscriptions","organizations_url":"https://api.github.com/users/muloem/orgs","repos_url":"https://api.github.com/users/muloem/repos","events_url":"https://api.github.com/users/muloem/events{/privacy}","received_events_url":"https://api.github.com/users/muloem/received_events","type":"User","site_admin":false},"body":"FYI - if you are applying the copyright to a file, make sure the year matches when that source file was edited.  So in this case, the file is first created in 2017 so copyright should start in 2017.","created_at":"2017-01-24T16:33:28Z","updated_at":"2017-01-24T16:48:03Z","html_url":"https://github.com/akvo/akvo-flow-mobile/pull/586#discussion_r97589914","pull_request_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/pulls/586","_links":{"self":{"href":"https://api.github.com/repos/akvo/akvo-flow-mobile/pulls/comments/97589914"},"html":{"href":"https://github.com/akvo/akvo-flow-mobile/pull/586#discussion_r97589914"},"pull_request":{"href":"https://api.github.com/repos/akvo/akvo-flow-mobile/pulls/586"}}},"pull_request":{"url":"https://api.github.com/repos/akvo/akvo-flow-mobile/pulls/586","id":100945054,"html_url":"https://github.com/akvo/akvo-flow-mobile/pull/586","diff_url":"https://github.com/akvo/akvo-flow-mobile/pull/586.diff","patch_url":"https://github.com/akvo/akvo-flow-mobile/pull/586.patch","issue_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/issues/586","number":586,"state":"open","locked":false,"title":"Rewrite HttpUtil.java (connect #585)","user":{"login":"MelEnt","id":984326,"avatar_url":"https://avatars.githubusercontent.com/u/984326?v=3","gravatar_id":"","url":"https://api.github.com/users/MelEnt","html_url":"https://github.com/MelEnt","followers_url":"https://api.github.com/users/MelEnt/followers","following_url":"https://api.github.com/users/MelEnt/following{/other_user}","gists_url":"https://api.github.com/users/MelEnt/gists{/gist_id}","starred_url":"https://api.github.com/users/MelEnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MelEnt/subscriptions","organizations_url":"https://api.github.com/users/MelEnt/orgs","repos_url":"https://api.github.com/users/MelEnt/repos","events_url":"https://api.github.com/users/MelEnt/events{/privacy}","received_events_url":"https://api.github.com/users/MelEnt/received_events","type":"User","site_admin":false},"body":"Rewritten HttpUtil.java but kept old as OldHttpUtil.java. \r\nAdded new class InternetDataConnection which is required to hold URL connection objects (used by new HttpUtil.java). \r\nAdded test cases for both old and new HttpUtil classes. \r\n\r\nAlso added gradle compilation dependencies: nanohttpd:2.2.0 (for testing HttpUtil)  and the standard com.android.support.test lib which is for testing Android Apps properly\r\n\r\n#### Before the PR (what is the issue or what needed to be done)\r\nIssue https://github.com/akvo/akvo-flow-mobile/issues/585 addresses the problem of current HttpUtil class being too cluttered and not written toward any accepted standard.\r\n\r\n#### The solution\r\nRewrite parts of the code, break out other parts. Create new class to handle the connection object and just have the HttpUtil class to retrieve what we want from the object we get.\r\n\r\n#### Screenshots (if appropriate)\r\n\r\n#### Reviewer Checklist\r\n* [x] Connect the issue\r\n* [x] Test plan\r\n* [ ] Copyright header\r\n* [ ] Code formatting\r\n* [ ] Documentation\r\n","created_at":"2017-01-10T20:12:08Z","updated_at":"2017-01-24T16:48:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"848bc384ab3429d74a3db996bb063a4db2b3ec00","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/pulls/586/commits","review_comments_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/pulls/586/comments","review_comment_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/issues/586/comments","statuses_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/statuses/521444cb371dc67e79564b5a85cdd82ba77a43b1","head":{"label":"MelEnt:issue/585-httputil-refactor","ref":"issue/585-httputil-refactor","sha":"521444cb371dc67e79564b5a85cdd82ba77a43b1","user":{"login":"MelEnt","id":984326,"avatar_url":"https://avatars.githubusercontent.com/u/984326?v=3","gravatar_id":"","url":"https://api.github.com/users/MelEnt","html_url":"https://github.com/MelEnt","followers_url":"https://api.github.com/users/MelEnt/followers","following_url":"https://api.github.com/users/MelEnt/following{/other_user}","gists_url":"https://api.github.com/users/MelEnt/gists{/gist_id}","starred_url":"https://api.github.com/users/MelEnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MelEnt/subscriptions","organizations_url":"https://api.github.com/users/MelEnt/orgs","repos_url":"https://api.github.com/users/MelEnt/repos","events_url":"https://api.github.com/users/MelEnt/events{/privacy}","received_events_url":"https://api.github.com/users/MelEnt/received_events","type":"User","site_admin":false},"repo":{"id":78567538,"name":"akvo-flow-mobile","full_name":"MelEnt/akvo-flow-mobile","owner":{"login":"MelEnt","id":984326,"avatar_url":"https://avatars.githubusercontent.com/u/984326?v=3","gravatar_id":"","url":"https://api.github.com/users/MelEnt","html_url":"https://github.com/MelEnt","followers_url":"https://api.github.com/users/MelEnt/followers","following_url":"https://api.github.com/users/MelEnt/following{/other_user}","gists_url":"https://api.github.com/users/MelEnt/gists{/gist_id}","starred_url":"https://api.github.com/users/MelEnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MelEnt/subscriptions","organizations_url":"https://api.github.com/users/MelEnt/orgs","repos_url":"https://api.github.com/users/MelEnt/repos","events_url":"https://api.github.com/users/MelEnt/events{/privacy}","received_events_url":"https://api.github.com/users/MelEnt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MelEnt/akvo-flow-mobile","description":"Akvo FLOW app","fork":true,"url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile","forks_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/forks","keys_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/teams","hooks_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/hooks","issue_events_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/events","assignees_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/tags","blobs_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/languages","stargazers_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/stargazers","contributors_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/contributors","subscribers_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/subscribers","subscription_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/subscription","commits_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/merges","archive_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/downloads","issues_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/labels{/name}","releases_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/releases{/id}","deployments_url":"https://api.github.com/repos/MelEnt/akvo-flow-mobile/deployments","created_at":"2017-01-10T19:42:29Z","updated_at":"2017-01-11T09:58:14Z","pushed_at":"2017-01-24T16:46:40Z","git_url":"git://github.com/MelEnt/akvo-flow-mobile.git","ssh_url":"git@github.com:MelEnt/akvo-flow-mobile.git","clone_url":"https://github.com/MelEnt/akvo-flow-mobile.git","svn_url":"https://github.com/MelEnt/akvo-flow-mobile","homepage":"","size":135369,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"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":"develop"}},"base":{"label":"akvo:develop","ref":"develop","sha":"7d039cca774a38725c5226528e9987458e1a71cf","user":{"login":"akvo","id":159843,"avatar_url":"https://avatars.githubusercontent.com/u/159843?v=3","gravatar_id":"","url":"https://api.github.com/users/akvo","html_url":"https://github.com/akvo","followers_url":"https://api.github.com/users/akvo/followers","following_url":"https://api.github.com/users/akvo/following{/other_user}","gists_url":"https://api.github.com/users/akvo/gists{/gist_id}","starred_url":"https://api.github.com/users/akvo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akvo/subscriptions","organizations_url":"https://api.github.com/users/akvo/orgs","repos_url":"https://api.github.com/users/akvo/repos","events_url":"https://api.github.com/users/akvo/events{/privacy}","received_events_url":"https://api.github.com/users/akvo/received_events","type":"Organization","site_admin":false},"repo":{"id":5380818,"name":"akvo-flow-mobile","full_name":"akvo/akvo-flow-mobile","owner":{"login":"akvo","id":159843,"avatar_url":"https://avatars.githubusercontent.com/u/159843?v=3","gravatar_id":"","url":"https://api.github.com/users/akvo","html_url":"https://github.com/akvo","followers_url":"https://api.github.com/users/akvo/followers","following_url":"https://api.github.com/users/akvo/following{/other_user}","gists_url":"https://api.github.com/users/akvo/gists{/gist_id}","starred_url":"https://api.github.com/users/akvo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akvo/subscriptions","organizations_url":"https://api.github.com/users/akvo/orgs","repos_url":"https://api.github.com/users/akvo/repos","events_url":"https://api.github.com/users/akvo/events{/privacy}","received_events_url":"https://api.github.com/users/akvo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akvo/akvo-flow-mobile","description":"Akvo FLOW app","fork":false,"url":"https://api.github.com/repos/akvo/akvo-flow-mobile","forks_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/forks","keys_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/teams","hooks_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/hooks","issue_events_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/events","assignees_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/tags","blobs_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/languages","stargazers_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/stargazers","contributors_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/contributors","subscribers_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/subscribers","subscription_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/subscription","commits_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/merges","archive_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/downloads","issues_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/labels{/name}","releases_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/releases{/id}","deployments_url":"https://api.github.com/repos/akvo/akvo-flow-mobile/deployments","created_at":"2012-08-11T15:36:16Z","updated_at":"2016-12-03T16:17:00Z","pushed_at":"2017-01-24T16:46:42Z","git_url":"git://github.com/akvo/akvo-flow-mobile.git","ssh_url":"git@github.com:akvo/akvo-flow-mobile.git","clone_url":"https://github.com/akvo/akvo-flow-mobile.git","svn_url":"https://github.com/akvo/akvo-flow-mobile","homepage":"","size":135449,"stargazers_count":9,"watchers_count":9,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":77,"forks":5,"open_issues":77,"watchers":9,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/akvo/akvo-flow-mobile/pulls/586"},"html":{"href":"https://github.com/akvo/akvo-flow-mobile/pull/586"},"issue":{"href":"https://api.github.com/repos/akvo/akvo-flow-mobile/issues/586"},"comments":{"href":"https://api.github.com/repos/akvo/akvo-flow-mobile/issues/586/comments"},"review_comments":{"href":"https://api.github.com/repos/akvo/akvo-flow-mobile/pulls/586/comments"},"review_comment":{"href":"https://api.github.com/repos/akvo/akvo-flow-mobile/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akvo/akvo-flow-mobile/pulls/586/commits"},"statuses":{"href":"https://api.github.com/repos/akvo/akvo-flow-mobile/statuses/521444cb371dc67e79564b5a85cdd82ba77a43b1"}}}}
{"actor":{"display_login":"muloem"}}