{"action":"created","comment":{"url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/comments/77475756","id":77475756,"diff_hunk":"@@ -88,9 +88,20 @@ public void save(AddressBook addressBook) throws StorageOperationException {\n         /* Note: Note the 'try with resource' statement below.\n          * More info: https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html\n          */\n-        try (final Writer fileWriter =\n-                     new BufferedWriter(new FileWriter(path.toFile()))) {\n+        try {\n+            if (!path.toFile().exists()) {\n+                throw new FileNotFoundException();\n+            }\n+            writeFile(addressBook);\n+        } catch (FileNotFoundException fnfe) {\n+            System.out.println(\"Storage file deleted! Recreating...\");\n+            writeFile(addressBook);","path":"src/seedu/addressbook/storage/StorageFile.java","position":13,"original_position":13,"commit_id":"9e97bd7b9308103f7c894ef663592145c1241e9b","original_commit_id":"9e97bd7b9308103f7c894ef663592145c1241e9b","user":{"login":"okkhoy","id":1023494,"avatar_url":"https://avatars.githubusercontent.com/u/1023494?v=3","gravatar_id":"","url":"https://api.github.com/users/okkhoy","html_url":"https://github.com/okkhoy","followers_url":"https://api.github.com/users/okkhoy/followers","following_url":"https://api.github.com/users/okkhoy/following{/other_user}","gists_url":"https://api.github.com/users/okkhoy/gists{/gist_id}","starred_url":"https://api.github.com/users/okkhoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okkhoy/subscriptions","organizations_url":"https://api.github.com/users/okkhoy/orgs","repos_url":"https://api.github.com/users/okkhoy/repos","events_url":"https://api.github.com/users/okkhoy/events{/privacy}","received_events_url":"https://api.github.com/users/okkhoy/received_events","type":"User","site_admin":false},"body":"think if there is a way to eliminate this (sort of) duplicate call in the same try-catch block,","created_at":"2016-09-05T06:39:40Z","updated_at":"2016-09-05T06:39:40Z","html_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/741#discussion_r77475756","pull_request_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/741","_links":{"self":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/comments/77475756"},"html":{"href":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/741#discussion_r77475756"},"pull_request":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/741"}}},"pull_request":{"url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/741","id":83898933,"html_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/741","diff_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/741.diff","patch_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/741.patch","issue_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues/741","number":741,"state":"open","locked":false,"title":"[T3A4][T13-A2] Kevin Ong","user":{"login":"Kevin-Ong","id":21094285,"avatar_url":"https://avatars.githubusercontent.com/u/21094285?v=3","gravatar_id":"","url":"https://api.github.com/users/Kevin-Ong","html_url":"https://github.com/Kevin-Ong","followers_url":"https://api.github.com/users/Kevin-Ong/followers","following_url":"https://api.github.com/users/Kevin-Ong/following{/other_user}","gists_url":"https://api.github.com/users/Kevin-Ong/gists{/gist_id}","starred_url":"https://api.github.com/users/Kevin-Ong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kevin-Ong/subscriptions","organizations_url":"https://api.github.com/users/Kevin-Ong/orgs","repos_url":"https://api.github.com/users/Kevin-Ong/repos","events_url":"https://api.github.com/users/Kevin-Ong/events{/privacy}","received_events_url":"https://api.github.com/users/Kevin-Ong/received_events","type":"User","site_admin":false},"body":"Ready for review","created_at":"2016-09-03T15:58:29Z","updated_at":"2016-09-05T06:39:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3e2968044013b116990c243a755124ead35b4492","assignee":{"login":"okkhoy","id":1023494,"avatar_url":"https://avatars.githubusercontent.com/u/1023494?v=3","gravatar_id":"","url":"https://api.github.com/users/okkhoy","html_url":"https://github.com/okkhoy","followers_url":"https://api.github.com/users/okkhoy/followers","following_url":"https://api.github.com/users/okkhoy/following{/other_user}","gists_url":"https://api.github.com/users/okkhoy/gists{/gist_id}","starred_url":"https://api.github.com/users/okkhoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okkhoy/subscriptions","organizations_url":"https://api.github.com/users/okkhoy/orgs","repos_url":"https://api.github.com/users/okkhoy/repos","events_url":"https://api.github.com/users/okkhoy/events{/privacy}","received_events_url":"https://api.github.com/users/okkhoy/received_events","type":"User","site_admin":false},"assignees":[{"login":"okkhoy","id":1023494,"avatar_url":"https://avatars.githubusercontent.com/u/1023494?v=3","gravatar_id":"","url":"https://api.github.com/users/okkhoy","html_url":"https://github.com/okkhoy","followers_url":"https://api.github.com/users/okkhoy/followers","following_url":"https://api.github.com/users/okkhoy/following{/other_user}","gists_url":"https://api.github.com/users/okkhoy/gists{/gist_id}","starred_url":"https://api.github.com/users/okkhoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okkhoy/subscriptions","organizations_url":"https://api.github.com/users/okkhoy/orgs","repos_url":"https://api.github.com/users/okkhoy/repos","events_url":"https://api.github.com/users/okkhoy/events{/privacy}","received_events_url":"https://api.github.com/users/okkhoy/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/741/commits","review_comments_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/741/comments","review_comment_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues/741/comments","statuses_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/statuses/9e97bd7b9308103f7c894ef663592145c1241e9b","head":{"label":"Kevin-Ong:T3A4","ref":"T3A4","sha":"9e97bd7b9308103f7c894ef663592145c1241e9b","user":{"login":"Kevin-Ong","id":21094285,"avatar_url":"https://avatars.githubusercontent.com/u/21094285?v=3","gravatar_id":"","url":"https://api.github.com/users/Kevin-Ong","html_url":"https://github.com/Kevin-Ong","followers_url":"https://api.github.com/users/Kevin-Ong/followers","following_url":"https://api.github.com/users/Kevin-Ong/following{/other_user}","gists_url":"https://api.github.com/users/Kevin-Ong/gists{/gist_id}","starred_url":"https://api.github.com/users/Kevin-Ong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kevin-Ong/subscriptions","organizations_url":"https://api.github.com/users/Kevin-Ong/orgs","repos_url":"https://api.github.com/users/Kevin-Ong/repos","events_url":"https://api.github.com/users/Kevin-Ong/events{/privacy}","received_events_url":"https://api.github.com/users/Kevin-Ong/received_events","type":"User","site_admin":false},"repo":{"id":67034214,"name":"addressbook-level2","full_name":"Kevin-Ong/addressbook-level2","owner":{"login":"Kevin-Ong","id":21094285,"avatar_url":"https://avatars.githubusercontent.com/u/21094285?v=3","gravatar_id":"","url":"https://api.github.com/users/Kevin-Ong","html_url":"https://github.com/Kevin-Ong","followers_url":"https://api.github.com/users/Kevin-Ong/followers","following_url":"https://api.github.com/users/Kevin-Ong/following{/other_user}","gists_url":"https://api.github.com/users/Kevin-Ong/gists{/gist_id}","starred_url":"https://api.github.com/users/Kevin-Ong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kevin-Ong/subscriptions","organizations_url":"https://api.github.com/users/Kevin-Ong/orgs","repos_url":"https://api.github.com/users/Kevin-Ong/repos","events_url":"https://api.github.com/users/Kevin-Ong/events{/privacy}","received_events_url":"https://api.github.com/users/Kevin-Ong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Kevin-Ong/addressbook-level2","description":"A Java sample application for students. An AddressBook application that uses OOP basics.","fork":true,"url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2","forks_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/forks","keys_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/teams","hooks_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/hooks","issue_events_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/issues/events{/number}","events_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/events","assignees_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/assignees{/user}","branches_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/branches{/branch}","tags_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/tags","blobs_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/statuses/{sha}","languages_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/languages","stargazers_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/stargazers","contributors_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/contributors","subscribers_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/subscribers","subscription_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/subscription","commits_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/contents/{+path}","compare_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/merges","archive_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/downloads","issues_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/issues{/number}","pulls_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/pulls{/number}","milestones_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/milestones{/number}","notifications_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/labels{/name}","releases_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/releases{/id}","deployments_url":"https://api.github.com/repos/Kevin-Ong/addressbook-level2/deployments","created_at":"2016-08-31T12:12:22Z","updated_at":"2016-08-31T12:12:23Z","pushed_at":"2016-09-04T12:23:20Z","git_url":"git://github.com/Kevin-Ong/addressbook-level2.git","ssh_url":"git@github.com:Kevin-Ong/addressbook-level2.git","clone_url":"https://github.com/Kevin-Ong/addressbook-level2.git","svn_url":"https://github.com/Kevin-Ong/addressbook-level2","homepage":null,"size":2999,"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":"nus-cs2103-AY1617S1:master","ref":"master","sha":"371e577077a87d43e0e2710c1b0985e4bafa5e0b","user":{"login":"nus-cs2103-AY1617S1","id":20475842,"avatar_url":"https://avatars.githubusercontent.com/u/20475842?v=3","gravatar_id":"","url":"https://api.github.com/users/nus-cs2103-AY1617S1","html_url":"https://github.com/nus-cs2103-AY1617S1","followers_url":"https://api.github.com/users/nus-cs2103-AY1617S1/followers","following_url":"https://api.github.com/users/nus-cs2103-AY1617S1/following{/other_user}","gists_url":"https://api.github.com/users/nus-cs2103-AY1617S1/gists{/gist_id}","starred_url":"https://api.github.com/users/nus-cs2103-AY1617S1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nus-cs2103-AY1617S1/subscriptions","organizations_url":"https://api.github.com/users/nus-cs2103-AY1617S1/orgs","repos_url":"https://api.github.com/users/nus-cs2103-AY1617S1/repos","events_url":"https://api.github.com/users/nus-cs2103-AY1617S1/events{/privacy}","received_events_url":"https://api.github.com/users/nus-cs2103-AY1617S1/received_events","type":"Organization","site_admin":false},"repo":{"id":66551047,"name":"addressbook-level2","full_name":"nus-cs2103-AY1617S1/addressbook-level2","owner":{"login":"nus-cs2103-AY1617S1","id":20475842,"avatar_url":"https://avatars.githubusercontent.com/u/20475842?v=3","gravatar_id":"","url":"https://api.github.com/users/nus-cs2103-AY1617S1","html_url":"https://github.com/nus-cs2103-AY1617S1","followers_url":"https://api.github.com/users/nus-cs2103-AY1617S1/followers","following_url":"https://api.github.com/users/nus-cs2103-AY1617S1/following{/other_user}","gists_url":"https://api.github.com/users/nus-cs2103-AY1617S1/gists{/gist_id}","starred_url":"https://api.github.com/users/nus-cs2103-AY1617S1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nus-cs2103-AY1617S1/subscriptions","organizations_url":"https://api.github.com/users/nus-cs2103-AY1617S1/orgs","repos_url":"https://api.github.com/users/nus-cs2103-AY1617S1/repos","events_url":"https://api.github.com/users/nus-cs2103-AY1617S1/events{/privacy}","received_events_url":"https://api.github.com/users/nus-cs2103-AY1617S1/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2","description":"A Java sample application for students. An AddressBook application that uses OOP basics.","fork":true,"url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2","forks_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/forks","keys_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/teams","hooks_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/hooks","issue_events_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues/events{/number}","events_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/events","assignees_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/assignees{/user}","branches_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/branches{/branch}","tags_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/tags","blobs_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/git/refs{/sha}","trees_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/statuses/{sha}","languages_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/languages","stargazers_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/stargazers","contributors_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/contributors","subscribers_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/subscribers","subscription_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/subscription","commits_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/commits{/sha}","git_commits_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/git/commits{/sha}","comments_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/comments{/number}","issue_comment_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues/comments{/number}","contents_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/contents/{+path}","compare_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/merges","archive_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/downloads","issues_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues{/number}","pulls_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls{/number}","milestones_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/milestones{/number}","notifications_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/labels{/name}","releases_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/releases{/id}","deployments_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/deployments","created_at":"2016-08-25T11:09:03Z","updated_at":"2016-09-02T12:48:52Z","pushed_at":"2016-09-05T06:33:16Z","git_url":"git://github.com/nus-cs2103-AY1617S1/addressbook-level2.git","ssh_url":"git@github.com:nus-cs2103-AY1617S1/addressbook-level2.git","clone_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2.git","svn_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2","homepage":null,"size":19103,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":248,"mirror_url":null,"open_issues_count":362,"forks":248,"open_issues":362,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/741"},"html":{"href":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/741"},"issue":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues/741"},"comments":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues/741/comments"},"review_comments":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/741/comments"},"review_comment":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/741/commits"},"statuses":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/statuses/9e97bd7b9308103f7c894ef663592145c1241e9b"}}}}
{"actor":{"display_login":"okkhoy"}}