{"action":"created","issue":{"url":"https://api.github.com/repos/se-edu/addressbook-level4/issues/261","repository_url":"https://api.github.com/repos/se-edu/addressbook-level4","labels_url":"https://api.github.com/repos/se-edu/addressbook-level4/issues/261/labels{/name}","comments_url":"https://api.github.com/repos/se-edu/addressbook-level4/issues/261/comments","events_url":"https://api.github.com/repos/se-edu/addressbook-level4/issues/261/events","html_url":"https://github.com/se-edu/addressbook-level4/pull/261","id":202214151,"number":261,"title":"Parser and ArgumentTokenizer cleanups #235","user":{"login":"PierceAndy","id":8639005,"avatar_url":"https://avatars.githubusercontent.com/u/8639005?v=3","gravatar_id":"","url":"https://api.github.com/users/PierceAndy","html_url":"https://github.com/PierceAndy","followers_url":"https://api.github.com/users/PierceAndy/followers","following_url":"https://api.github.com/users/PierceAndy/following{/other_user}","gists_url":"https://api.github.com/users/PierceAndy/gists{/gist_id}","starred_url":"https://api.github.com/users/PierceAndy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PierceAndy/subscriptions","organizations_url":"https://api.github.com/users/PierceAndy/orgs","repos_url":"https://api.github.com/users/PierceAndy/repos","events_url":"https://api.github.com/users/PierceAndy/events{/privacy}","received_events_url":"https://api.github.com/users/PierceAndy/received_events","type":"User","site_admin":false},"labels":[{"id":456150466,"url":"https://api.github.com/repos/se-edu/addressbook-level4/labels/s.ToReview","name":"s.ToReview","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":{"login":"yamgent","id":3168908,"avatar_url":"https://avatars.githubusercontent.com/u/3168908?v=3","gravatar_id":"","url":"https://api.github.com/users/yamgent","html_url":"https://github.com/yamgent","followers_url":"https://api.github.com/users/yamgent/followers","following_url":"https://api.github.com/users/yamgent/following{/other_user}","gists_url":"https://api.github.com/users/yamgent/gists{/gist_id}","starred_url":"https://api.github.com/users/yamgent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamgent/subscriptions","organizations_url":"https://api.github.com/users/yamgent/orgs","repos_url":"https://api.github.com/users/yamgent/repos","events_url":"https://api.github.com/users/yamgent/events{/privacy}","received_events_url":"https://api.github.com/users/yamgent/received_events","type":"User","site_admin":false},"assignees":[{"login":"yamgent","id":3168908,"avatar_url":"https://avatars.githubusercontent.com/u/3168908?v=3","gravatar_id":"","url":"https://api.github.com/users/yamgent","html_url":"https://github.com/yamgent","followers_url":"https://api.github.com/users/yamgent/followers","following_url":"https://api.github.com/users/yamgent/following{/other_user}","gists_url":"https://api.github.com/users/yamgent/gists{/gist_id}","starred_url":"https://api.github.com/users/yamgent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamgent/subscriptions","organizations_url":"https://api.github.com/users/yamgent/orgs","repos_url":"https://api.github.com/users/yamgent/repos","events_url":"https://api.github.com/users/yamgent/events{/privacy}","received_events_url":"https://api.github.com/users/yamgent/received_events","type":"User","site_admin":false},{"login":"MightyCupcakes","id":13433484,"avatar_url":"https://avatars.githubusercontent.com/u/13433484?v=3","gravatar_id":"","url":"https://api.github.com/users/MightyCupcakes","html_url":"https://github.com/MightyCupcakes","followers_url":"https://api.github.com/users/MightyCupcakes/followers","following_url":"https://api.github.com/users/MightyCupcakes/following{/other_user}","gists_url":"https://api.github.com/users/MightyCupcakes/gists{/gist_id}","starred_url":"https://api.github.com/users/MightyCupcakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MightyCupcakes/subscriptions","organizations_url":"https://api.github.com/users/MightyCupcakes/orgs","repos_url":"https://api.github.com/users/MightyCupcakes/repos","events_url":"https://api.github.com/users/MightyCupcakes/events{/privacy}","received_events_url":"https://api.github.com/users/MightyCupcakes/received_events","type":"User","site_admin":false}],"milestone":null,"comments":36,"created_at":"2017-01-20T18:49:54Z","updated_at":"2017-02-12T12:16:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/261","html_url":"https://github.com/se-edu/addressbook-level4/pull/261","diff_url":"https://github.com/se-edu/addressbook-level4/pull/261.diff","patch_url":"https://github.com/se-edu/addressbook-level4/pull/261.patch"},"body":"Fixes #235 \r\nCollecting a list of small cleanups that can be made.\r\nCleanups have also been applied to 97c34f2b96ec34b3afd93876f3eda12455759c91 that addresses #141.\r\n\r\n## `ArgumentTokenizer`\r\n\r\n- `getPreamble()`: Rather than returning `Optional.empty()`, an empty string can be returned instead. (With defensive programming, callers will need to check for empty string anyway).\r\n\r\n- `getAllValues()`: Rather than returning `Optional.empty()`, an empty list can be returned instead. (With defensive programming, callers will need to check for an empty list anyway). This has the side benefit of removing the `toSet()` helper in `Parser`.\r\n\r\n## `Parser`\r\n\r\nUse of regular expressions that are less readable than their less fancy counterparts:\r\n\r\n- `PERSON_INDEX_ARGS_FORMAT` can be replaced with `String.isEmpty()`. Actually, I think `StringUtils.isUnsignedInteger()` already checks for empty string soo...\r\n\r\n- `KEYWORDS_ARGS_FORMAT` can be replaced with `keywords.length <= 0`.\r\n"},"comment":{"url":"https://api.github.com/repos/se-edu/addressbook-level4/issues/comments/279214543","html_url":"https://github.com/se-edu/addressbook-level4/pull/261#issuecomment-279214543","issue_url":"https://api.github.com/repos/se-edu/addressbook-level4/issues/261","id":279214543,"user":{"login":"PierceAndy","id":8639005,"avatar_url":"https://avatars.githubusercontent.com/u/8639005?v=3","gravatar_id":"","url":"https://api.github.com/users/PierceAndy","html_url":"https://github.com/PierceAndy","followers_url":"https://api.github.com/users/PierceAndy/followers","following_url":"https://api.github.com/users/PierceAndy/following{/other_user}","gists_url":"https://api.github.com/users/PierceAndy/gists{/gist_id}","starred_url":"https://api.github.com/users/PierceAndy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PierceAndy/subscriptions","organizations_url":"https://api.github.com/users/PierceAndy/orgs","repos_url":"https://api.github.com/users/PierceAndy/repos","events_url":"https://api.github.com/users/PierceAndy/events{/privacy}","received_events_url":"https://api.github.com/users/PierceAndy/received_events","type":"User","site_admin":false},"created_at":"2017-02-12T12:16:05Z","updated_at":"2017-02-12T12:16:05Z","body":"# v13\r\n- Updated [v12 4/5] - [v12 5/5] commit messages based on reviews."}}
{"actor":{"display_login":"PierceAndy"}}