{"action":"created","comment":{"url":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/comments/167765295","pull_request_review_id":96029891,"id":167765295,"diff_hunk":"@@ -23,8 +28,19 @@\n     private static final File EMPTY_FILE = new File(TEST_DATA_FOLDER + \"empty.xml\");\n     private static final File MISSING_FILE = new File(TEST_DATA_FOLDER + \"missing.xml\");\n     private static final File VALID_FILE = new File(TEST_DATA_FOLDER + \"validAddressBook.xml\");\n+    private static final File MISSING_PERSON_FIELD_FILE = new File(TEST_DATA_FOLDER + \"missingPersonField.xml\");\n+    private static final File INVALID_PERSON_FIELD_FILE = new File(TEST_DATA_FOLDER + \"invalidPersonField.xml\");\n+    private static final File VALID_PERSON_FILE = new File(TEST_DATA_FOLDER + \"validPerson.xml\");\n     private static final File TEMP_FILE = new File(TestUtil.getFilePathInSandboxFolder(\"tempAddressBook.xml\"));\n \n+    private static final String INVALID_PHONE = \"9482asf424\";\n+\n+    private static final String VALID_NAME = \"Hans Muster\";","path":"src/test/java/seedu/address/commons/util/XmlUtilTest.java","position":31,"original_position":31,"commit_id":"34e6687ab010eb8997c5bf8b542ecb9f1e573aac","original_commit_id":"34e6687ab010eb8997c5bf8b542ecb9f1e573aac","user":{"login":"yamidark","id":18352498,"avatar_url":"https://avatars1.githubusercontent.com/u/18352498?v=4","gravatar_id":"","url":"https://api.github.com/users/yamidark","html_url":"https://github.com/yamidark","followers_url":"https://api.github.com/users/yamidark/followers","following_url":"https://api.github.com/users/yamidark/following{/other_user}","gists_url":"https://api.github.com/users/yamidark/gists{/gist_id}","starred_url":"https://api.github.com/users/yamidark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamidark/subscriptions","organizations_url":"https://api.github.com/users/yamidark/orgs","repos_url":"https://api.github.com/users/yamidark/repos","events_url":"https://api.github.com/users/yamidark/events{/privacy}","received_events_url":"https://api.github.com/users/yamidark/received_events","type":"User","site_admin":false},"body":">Maybe we can try having a XmlAdaptedPersonBuilder\r\n\r\nWould have lots of similar code with `PersonBuilder` though.\r\nMaybe we could change `PersonBuilder` to store each field as a `String` instead, then we can  change the methods to `buildPerson` or `buildXmlAdaptedPerson` for what we need respectively.\r\nAlso found that `PersonBuilder` does not have assertions that the parameters supplied for each field are non-`null`. Could add those assertion checks in `buildPerson` too.","created_at":"2018-02-13T05:36:46Z","updated_at":"2018-02-13T05:36:46Z","html_url":"https://github.com/se-edu/addressbook-level4/pull/806#discussion_r167765295","pull_request_url":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/806","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/comments/167765295"},"html":{"href":"https://github.com/se-edu/addressbook-level4/pull/806#discussion_r167765295"},"pull_request":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/806"}},"in_reply_to_id":167733066},"pull_request":{"url":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/806","id":164117606,"html_url":"https://github.com/se-edu/addressbook-level4/pull/806","diff_url":"https://github.com/se-edu/addressbook-level4/pull/806.diff","patch_url":"https://github.com/se-edu/addressbook-level4/pull/806.patch","issue_url":"https://api.github.com/repos/se-edu/addressbook-level4/issues/806","number":806,"state":"open","locked":false,"title":"XmlAdaptedPerson#toModelType(): Enforce checking of required parameters #725","user":{"login":"yamidark","id":18352498,"avatar_url":"https://avatars1.githubusercontent.com/u/18352498?v=4","gravatar_id":"","url":"https://api.github.com/users/yamidark","html_url":"https://github.com/yamidark","followers_url":"https://api.github.com/users/yamidark/followers","following_url":"https://api.github.com/users/yamidark/following{/other_user}","gists_url":"https://api.github.com/users/yamidark/gists{/gist_id}","starred_url":"https://api.github.com/users/yamidark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamidark/subscriptions","organizations_url":"https://api.github.com/users/yamidark/orgs","repos_url":"https://api.github.com/users/yamidark/repos","events_url":"https://api.github.com/users/yamidark/events{/privacy}","received_events_url":"https://api.github.com/users/yamidark/received_events","type":"User","site_admin":false},"body":"Fixes #725\r\n\r\n```\r\nXmlAdaptedPerson#toModelType() does not have a non-null check for each\r\nparameter in person before the isValid*(String).\r\n\r\nWhen null value is passed into the parameter's isValid*(String) check,\r\na NullPointerException is thrown, causing the app to crash.\r\n\r\nLet's update XmlAdaptedPerson#toModelType() to have a separate non-null\r\ncheck for each parameter before passing them into the isValid*(String)\r\ncheck.\r\n```","created_at":"2018-01-20T08:18:21Z","updated_at":"2018-02-13T05:36:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dfe48421da2c4c1a57943fcf4b94aa2642b110f1","assignee":null,"assignees":[],"requested_reviewers":[{"login":"eugenepeh","id":19277206,"avatar_url":"https://avatars2.githubusercontent.com/u/19277206?v=4","gravatar_id":"","url":"https://api.github.com/users/eugenepeh","html_url":"https://github.com/eugenepeh","followers_url":"https://api.github.com/users/eugenepeh/followers","following_url":"https://api.github.com/users/eugenepeh/following{/other_user}","gists_url":"https://api.github.com/users/eugenepeh/gists{/gist_id}","starred_url":"https://api.github.com/users/eugenepeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eugenepeh/subscriptions","organizations_url":"https://api.github.com/users/eugenepeh/orgs","repos_url":"https://api.github.com/users/eugenepeh/repos","events_url":"https://api.github.com/users/eugenepeh/events{/privacy}","received_events_url":"https://api.github.com/users/eugenepeh/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":456150209,"url":"https://api.github.com/repos/se-edu/addressbook-level4/labels/s.Ongoing","name":"s.Ongoing","color":"bfd4f2","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/806/commits","review_comments_url":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/806/comments","review_comment_url":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/comments{/number}","comments_url":"https://api.github.com/repos/se-edu/addressbook-level4/issues/806/comments","statuses_url":"https://api.github.com/repos/se-edu/addressbook-level4/statuses/34e6687ab010eb8997c5bf8b542ecb9f1e573aac","head":{"label":"yamidark:725-XmlAdaptedPerson-enforce-checking-parameters","ref":"725-XmlAdaptedPerson-enforce-checking-parameters","sha":"34e6687ab010eb8997c5bf8b542ecb9f1e573aac","user":{"login":"yamidark","id":18352498,"avatar_url":"https://avatars1.githubusercontent.com/u/18352498?v=4","gravatar_id":"","url":"https://api.github.com/users/yamidark","html_url":"https://github.com/yamidark","followers_url":"https://api.github.com/users/yamidark/followers","following_url":"https://api.github.com/users/yamidark/following{/other_user}","gists_url":"https://api.github.com/users/yamidark/gists{/gist_id}","starred_url":"https://api.github.com/users/yamidark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamidark/subscriptions","organizations_url":"https://api.github.com/users/yamidark/orgs","repos_url":"https://api.github.com/users/yamidark/repos","events_url":"https://api.github.com/users/yamidark/events{/privacy}","received_events_url":"https://api.github.com/users/yamidark/received_events","type":"User","site_admin":false},"repo":{"id":115731630,"name":"addressbook-level4","full_name":"yamidark/addressbook-level4","owner":{"login":"yamidark","id":18352498,"avatar_url":"https://avatars1.githubusercontent.com/u/18352498?v=4","gravatar_id":"","url":"https://api.github.com/users/yamidark","html_url":"https://github.com/yamidark","followers_url":"https://api.github.com/users/yamidark/followers","following_url":"https://api.github.com/users/yamidark/following{/other_user}","gists_url":"https://api.github.com/users/yamidark/gists{/gist_id}","starred_url":"https://api.github.com/users/yamidark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamidark/subscriptions","organizations_url":"https://api.github.com/users/yamidark/orgs","repos_url":"https://api.github.com/users/yamidark/repos","events_url":"https://api.github.com/users/yamidark/events{/privacy}","received_events_url":"https://api.github.com/users/yamidark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yamidark/addressbook-level4","description":"Address Book sample application (Level 4)","fork":true,"url":"https://api.github.com/repos/yamidark/addressbook-level4","forks_url":"https://api.github.com/repos/yamidark/addressbook-level4/forks","keys_url":"https://api.github.com/repos/yamidark/addressbook-level4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yamidark/addressbook-level4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yamidark/addressbook-level4/teams","hooks_url":"https://api.github.com/repos/yamidark/addressbook-level4/hooks","issue_events_url":"https://api.github.com/repos/yamidark/addressbook-level4/issues/events{/number}","events_url":"https://api.github.com/repos/yamidark/addressbook-level4/events","assignees_url":"https://api.github.com/repos/yamidark/addressbook-level4/assignees{/user}","branches_url":"https://api.github.com/repos/yamidark/addressbook-level4/branches{/branch}","tags_url":"https://api.github.com/repos/yamidark/addressbook-level4/tags","blobs_url":"https://api.github.com/repos/yamidark/addressbook-level4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yamidark/addressbook-level4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yamidark/addressbook-level4/git/refs{/sha}","trees_url":"https://api.github.com/repos/yamidark/addressbook-level4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yamidark/addressbook-level4/statuses/{sha}","languages_url":"https://api.github.com/repos/yamidark/addressbook-level4/languages","stargazers_url":"https://api.github.com/repos/yamidark/addressbook-level4/stargazers","contributors_url":"https://api.github.com/repos/yamidark/addressbook-level4/contributors","subscribers_url":"https://api.github.com/repos/yamidark/addressbook-level4/subscribers","subscription_url":"https://api.github.com/repos/yamidark/addressbook-level4/subscription","commits_url":"https://api.github.com/repos/yamidark/addressbook-level4/commits{/sha}","git_commits_url":"https://api.github.com/repos/yamidark/addressbook-level4/git/commits{/sha}","comments_url":"https://api.github.com/repos/yamidark/addressbook-level4/comments{/number}","issue_comment_url":"https://api.github.com/repos/yamidark/addressbook-level4/issues/comments{/number}","contents_url":"https://api.github.com/repos/yamidark/addressbook-level4/contents/{+path}","compare_url":"https://api.github.com/repos/yamidark/addressbook-level4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yamidark/addressbook-level4/merges","archive_url":"https://api.github.com/repos/yamidark/addressbook-level4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yamidark/addressbook-level4/downloads","issues_url":"https://api.github.com/repos/yamidark/addressbook-level4/issues{/number}","pulls_url":"https://api.github.com/repos/yamidark/addressbook-level4/pulls{/number}","milestones_url":"https://api.github.com/repos/yamidark/addressbook-level4/milestones{/number}","notifications_url":"https://api.github.com/repos/yamidark/addressbook-level4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yamidark/addressbook-level4/labels{/name}","releases_url":"https://api.github.com/repos/yamidark/addressbook-level4/releases{/id}","deployments_url":"https://api.github.com/repos/yamidark/addressbook-level4/deployments","created_at":"2017-12-29T15:08:24Z","updated_at":"2017-12-29T15:08:27Z","pushed_at":"2018-02-13T03:22:29Z","git_url":"git://github.com/yamidark/addressbook-level4.git","ssh_url":"git@github.com:yamidark/addressbook-level4.git","clone_url":"https://github.com/yamidark/addressbook-level4.git","svn_url":"https://github.com/yamidark/addressbook-level4","homepage":"https://se-edu.github.io/addressbook-level4","size":7200,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"se-edu:master","ref":"master","sha":"eaa0cfbee95d15b88f550122d0c9f115f1c9a551","user":{"login":"se-edu","id":20763652,"avatar_url":"https://avatars2.githubusercontent.com/u/20763652?v=4","gravatar_id":"","url":"https://api.github.com/users/se-edu","html_url":"https://github.com/se-edu","followers_url":"https://api.github.com/users/se-edu/followers","following_url":"https://api.github.com/users/se-edu/following{/other_user}","gists_url":"https://api.github.com/users/se-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/se-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/se-edu/subscriptions","organizations_url":"https://api.github.com/users/se-edu/orgs","repos_url":"https://api.github.com/users/se-edu/repos","events_url":"https://api.github.com/users/se-edu/events{/privacy}","received_events_url":"https://api.github.com/users/se-edu/received_events","type":"Organization","site_admin":false},"repo":{"id":65120941,"name":"addressbook-level4","full_name":"se-edu/addressbook-level4","owner":{"login":"se-edu","id":20763652,"avatar_url":"https://avatars2.githubusercontent.com/u/20763652?v=4","gravatar_id":"","url":"https://api.github.com/users/se-edu","html_url":"https://github.com/se-edu","followers_url":"https://api.github.com/users/se-edu/followers","following_url":"https://api.github.com/users/se-edu/following{/other_user}","gists_url":"https://api.github.com/users/se-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/se-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/se-edu/subscriptions","organizations_url":"https://api.github.com/users/se-edu/orgs","repos_url":"https://api.github.com/users/se-edu/repos","events_url":"https://api.github.com/users/se-edu/events{/privacy}","received_events_url":"https://api.github.com/users/se-edu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/se-edu/addressbook-level4","description":"Address Book sample application (Level 4)","fork":false,"url":"https://api.github.com/repos/se-edu/addressbook-level4","forks_url":"https://api.github.com/repos/se-edu/addressbook-level4/forks","keys_url":"https://api.github.com/repos/se-edu/addressbook-level4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/se-edu/addressbook-level4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/se-edu/addressbook-level4/teams","hooks_url":"https://api.github.com/repos/se-edu/addressbook-level4/hooks","issue_events_url":"https://api.github.com/repos/se-edu/addressbook-level4/issues/events{/number}","events_url":"https://api.github.com/repos/se-edu/addressbook-level4/events","assignees_url":"https://api.github.com/repos/se-edu/addressbook-level4/assignees{/user}","branches_url":"https://api.github.com/repos/se-edu/addressbook-level4/branches{/branch}","tags_url":"https://api.github.com/repos/se-edu/addressbook-level4/tags","blobs_url":"https://api.github.com/repos/se-edu/addressbook-level4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/se-edu/addressbook-level4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/se-edu/addressbook-level4/git/refs{/sha}","trees_url":"https://api.github.com/repos/se-edu/addressbook-level4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/se-edu/addressbook-level4/statuses/{sha}","languages_url":"https://api.github.com/repos/se-edu/addressbook-level4/languages","stargazers_url":"https://api.github.com/repos/se-edu/addressbook-level4/stargazers","contributors_url":"https://api.github.com/repos/se-edu/addressbook-level4/contributors","subscribers_url":"https://api.github.com/repos/se-edu/addressbook-level4/subscribers","subscription_url":"https://api.github.com/repos/se-edu/addressbook-level4/subscription","commits_url":"https://api.github.com/repos/se-edu/addressbook-level4/commits{/sha}","git_commits_url":"https://api.github.com/repos/se-edu/addressbook-level4/git/commits{/sha}","comments_url":"https://api.github.com/repos/se-edu/addressbook-level4/comments{/number}","issue_comment_url":"https://api.github.com/repos/se-edu/addressbook-level4/issues/comments{/number}","contents_url":"https://api.github.com/repos/se-edu/addressbook-level4/contents/{+path}","compare_url":"https://api.github.com/repos/se-edu/addressbook-level4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/se-edu/addressbook-level4/merges","archive_url":"https://api.github.com/repos/se-edu/addressbook-level4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/se-edu/addressbook-level4/downloads","issues_url":"https://api.github.com/repos/se-edu/addressbook-level4/issues{/number}","pulls_url":"https://api.github.com/repos/se-edu/addressbook-level4/pulls{/number}","milestones_url":"https://api.github.com/repos/se-edu/addressbook-level4/milestones{/number}","notifications_url":"https://api.github.com/repos/se-edu/addressbook-level4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/se-edu/addressbook-level4/labels{/name}","releases_url":"https://api.github.com/repos/se-edu/addressbook-level4/releases{/id}","deployments_url":"https://api.github.com/repos/se-edu/addressbook-level4/deployments","created_at":"2016-08-07T07:17:26Z","updated_at":"2018-02-13T01:17:48Z","pushed_at":"2018-02-13T01:11:14Z","git_url":"git://github.com/se-edu/addressbook-level4.git","ssh_url":"git@github.com:se-edu/addressbook-level4.git","clone_url":"https://github.com/se-edu/addressbook-level4.git","svn_url":"https://github.com/se-edu/addressbook-level4","homepage":"https://se-edu.github.io/addressbook-level4","size":16227,"stargazers_count":8,"watchers_count":8,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":736,"mirror_url":null,"archived":false,"open_issues_count":118,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":736,"open_issues":118,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/806"},"html":{"href":"https://github.com/se-edu/addressbook-level4/pull/806"},"issue":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/issues/806"},"comments":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/issues/806/comments"},"review_comments":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/806/comments"},"review_comment":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/806/commits"},"statuses":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/statuses/34e6687ab010eb8997c5bf8b542ecb9f1e573aac"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"yamidark"}}