payload: {"action":"opened","number":5355,"pull_request":{"url":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/5355","id":293079337,"node_id":"MDExOlB1bGxSZXF1ZXN0MjkzMDc5MzM3","html_url":"https://github.com/ankidroid/Anki-Android/pull/5355","diff_url":"https://github.com/ankidroid/Anki-Android/pull/5355.diff","patch_url":"https://github.com/ankidroid/Anki-Android/pull/5355.patch","issue_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/5355","number":5355,"state":"open","locked":false,"title":"Handle null correctly for db w/no version but stable app version","user":{"login":"mikehardy","id":782704,"node_id":"MDQ6VXNlcjc4MjcwNA==","avatar_url":"https://avatars1.githubusercontent.com/u/782704?v=4","gravatar_id":"","url":"https://api.github.com/users/mikehardy","html_url":"https://github.com/mikehardy","followers_url":"https://api.github.com/users/mikehardy/followers","following_url":"https://api.github.com/users/mikehardy/following{/other_user}","gists_url":"https://api.github.com/users/mikehardy/gists{/gist_id}","starred_url":"https://api.github.com/users/mikehardy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikehardy/subscriptions","organizations_url":"https://api.github.com/users/mikehardy/orgs","repos_url":"https://api.github.com/users/mikehardy/repos","events_url":"https://api.github.com/users/mikehardy/events{/privacy}","received_events_url":"https://api.github.com/users/mikehardy/received_events","type":"User","site_admin":false},"body":"## Pull Request template\r\n\r\n## Purpose / Description\r\nThere is a mis-handled case if the app is not upgrading based on preferences version, but there is a database that does not have our version yet. It causes a NullPointerException and crashes on startup\r\n\r\nThis can happen if you have already done the 2.9alpha74 / database-version PR, but then do a full sync from a collection in the cloud from before the 2.9alpha74 / database-version PR\r\n\r\nThis correctly demonstrates the case with a test, and fixes it\r\n\r\n## Fixes\r\n#5343 \r\n\r\n## Approach\r\nCode examination / reasoning showed a potential NPE during Long unboxing I hadn't thought about, and when I tried to tickle it with a new unit test I got the same stack I'm seeing in ACRA. I add a null check, and it seems to work.\r\n\r\n## How Has This Been Tested?\r\n\r\nUnit test failed before I fixed it, passes now\r\n\r\n## Learning (optional, can help others)\r\n_Describe the research stage_\r\n\r\n_Links to blog posts, patterns, libraries or addons used to solve this problem_\r\n\r\n## Checklist\r\n_Please, go through these checks before submitting the PR._\r\n\r\n- [x] You have not changed whitespace unnecessarily (it makes diffs hard to read)\r\n- [x] You have a descriptive commit message with a short title (first line, max 50 chars).\r\n- [x] Your code follows the style of the project (e.g. never omit braces in `if` statements) \r\n- [x] You have commented your code, particularly in hard-to-understand areas\r\n- [x] You have performed a self-review of your own code\r\n","created_at":"2019-06-30T05:01:21Z","updated_at":"2019-06-30T05:01:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/5355/commits","review_comments_url":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/5355/comments","review_comment_url":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/5355/comments","statuses_url":"https://api.github.com/repos/ankidroid/Anki-Android/statuses/06ea1bc65c07ef4d5114b8789aca02c03e9c7c65","head":{"label":"mikehardy:issoe5354/NPE-in-db-upgrade-check","ref":"issoe5354/NPE-in-db-upgrade-check","sha":"06ea1bc65c07ef4d5114b8789aca02c03e9c7c65","user":{"login":"mikehardy","id":782704,"node_id":"MDQ6VXNlcjc4MjcwNA==","avatar_url":"https://avatars1.githubusercontent.com/u/782704?v=4","gravatar_id":"","url":"https://api.github.com/users/mikehardy","html_url":"https://github.com/mikehardy","followers_url":"https://api.github.com/users/mikehardy/followers","following_url":"https://api.github.com/users/mikehardy/following{/other_user}","gists_url":"https://api.github.com/users/mikehardy/gists{/gist_id}","starred_url":"https://api.github.com/users/mikehardy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikehardy/subscriptions","organizations_url":"https://api.github.com/users/mikehardy/orgs","repos_url":"https://api.github.com/users/mikehardy/repos","events_url":"https://api.github.com/users/mikehardy/events{/privacy}","received_events_url":"https://api.github.com/users/mikehardy/received_events","type":"User","site_admin":false},"repo":{"id":113939187,"node_id":"MDEwOlJlcG9zaXRvcnkxMTM5MzkxODc=","name":"Anki-Android","full_name":"mikehardy/Anki-Android","private":false,"owner":{"login":"mikehardy","id":782704,"node_id":"MDQ6VXNlcjc4MjcwNA==","avatar_url":"https://avatars1.githubusercontent.com/u/782704?v=4","gravatar_id":"","url":"https://api.github.com/users/mikehardy","html_url":"https://github.com/mikehardy","followers_url":"https://api.github.com/users/mikehardy/followers","following_url":"https://api.github.com/users/mikehardy/following{/other_user}","gists_url":"https://api.github.com/users/mikehardy/gists{/gist_id}","starred_url":"https://api.github.com/users/mikehardy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikehardy/subscriptions","organizations_url":"https://api.github.com/users/mikehardy/orgs","repos_url":"https://api.github.com/users/mikehardy/repos","events_url":"https://api.github.com/users/mikehardy/events{/privacy}","received_events_url":"https://api.github.com/users/mikehardy/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mikehardy/Anki-Android","description":"AnkiDroid: Anki on Android","fork":true,"url":"https://api.github.com/repos/mikehardy/Anki-Android","forks_url":"https://api.github.com/repos/mikehardy/Anki-Android/forks","keys_url":"https://api.github.com/repos/mikehardy/Anki-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikehardy/Anki-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikehardy/Anki-Android/teams","hooks_url":"https://api.github.com/repos/mikehardy/Anki-Android/hooks","issue_events_url":"https://api.github.com/repos/mikehardy/Anki-Android/issues/events{/number}","events_url":"https://api.github.com/repos/mikehardy/Anki-Android/events","assignees_url":"https://api.github.com/repos/mikehardy/Anki-Android/assignees{/user}","branches_url":"https://api.github.com/repos/mikehardy/Anki-Android/branches{/branch}","tags_url":"https://api.github.com/repos/mikehardy/Anki-Android/tags","blobs_url":"https://api.github.com/repos/mikehardy/Anki-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikehardy/Anki-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikehardy/Anki-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikehardy/Anki-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikehardy/Anki-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/mikehardy/Anki-Android/languages","stargazers_url":"https://api.github.com/repos/mikehardy/Anki-Android/stargazers","contributors_url":"https://api.github.com/repos/mikehardy/Anki-Android/contributors","subscribers_url":"https://api.github.com/repos/mikehardy/Anki-Android/subscribers","subscription_url":"https://api.github.com/repos/mikehardy/Anki-Android/subscription","commits_url":"https://api.github.com/repos/mikehardy/Anki-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikehardy/Anki-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikehardy/Anki-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikehardy/Anki-Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikehardy/Anki-Android/contents/{+path}","compare_url":"https://api.github.com/repos/mikehardy/Anki-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikehardy/Anki-Android/merges","archive_url":"https://api.github.com/repos/mikehardy/Anki-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikehardy/Anki-Android/downloads","issues_url":"https://api.github.com/repos/mikehardy/Anki-Android/issues{/number}","pulls_url":"https://api.github.com/repos/mikehardy/Anki-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/mikehardy/Anki-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/mikehardy/Anki-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikehardy/Anki-Android/labels{/name}","releases_url":"https://api.github.com/repos/mikehardy/Anki-Android/releases{/id}","deployments_url":"https://api.github.com/repos/mikehardy/Anki-Android/deployments","created_at":"2017-12-12T03:35:26Z","updated_at":"2019-06-28T04:31:34Z","pushed_at":"2019-06-30T05:00:26Z","git_url":"git://github.com/mikehardy/Anki-Android.git","ssh_url":"git@github.com:mikehardy/Anki-Android.git","clone_url":"https://github.com/mikehardy/Anki-Android.git","svn_url":"https://github.com/mikehardy/Anki-Android","homepage":"","size":111113,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"ankidroid:master","ref":"master","sha":"c849142223a111b3fbf062a32cb9dfd3e7ff57e0","user":{"login":"ankidroid","id":3320903,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMjA5MDM=","avatar_url":"https://avatars0.githubusercontent.com/u/3320903?v=4","gravatar_id":"","url":"https://api.github.com/users/ankidroid","html_url":"https://github.com/ankidroid","followers_url":"https://api.github.com/users/ankidroid/followers","following_url":"https://api.github.com/users/ankidroid/following{/other_user}","gists_url":"https://api.github.com/users/ankidroid/gists{/gist_id}","starred_url":"https://api.github.com/users/ankidroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankidroid/subscriptions","organizations_url":"https://api.github.com/users/ankidroid/orgs","repos_url":"https://api.github.com/users/ankidroid/repos","events_url":"https://api.github.com/users/ankidroid/events{/privacy}","received_events_url":"https://api.github.com/users/ankidroid/received_events","type":"Organization","site_admin":false},"repo":{"id":7716883,"node_id":"MDEwOlJlcG9zaXRvcnk3NzE2ODgz","name":"Anki-Android","full_name":"ankidroid/Anki-Android","private":false,"owner":{"login":"ankidroid","id":3320903,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMjA5MDM=","avatar_url":"https://avatars0.githubusercontent.com/u/3320903?v=4","gravatar_id":"","url":"https://api.github.com/users/ankidroid","html_url":"https://github.com/ankidroid","followers_url":"https://api.github.com/users/ankidroid/followers","following_url":"https://api.github.com/users/ankidroid/following{/other_user}","gists_url":"https://api.github.com/users/ankidroid/gists{/gist_id}","starred_url":"https://api.github.com/users/ankidroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankidroid/subscriptions","organizations_url":"https://api.github.com/users/ankidroid/orgs","repos_url":"https://api.github.com/users/ankidroid/repos","events_url":"https://api.github.com/users/ankidroid/events{/privacy}","received_events_url":"https://api.github.com/users/ankidroid/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ankidroid/Anki-Android","description":"AnkiDroid: Anki on Android","fork":false,"url":"https://api.github.com/repos/ankidroid/Anki-Android","forks_url":"https://api.github.com/repos/ankidroid/Anki-Android/forks","keys_url":"https://api.github.com/repos/ankidroid/Anki-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ankidroid/Anki-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ankidroid/Anki-Android/teams","hooks_url":"https://api.github.com/repos/ankidroid/Anki-Android/hooks","issue_events_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/events{/number}","events_url":"https://api.github.com/repos/ankidroid/Anki-Android/events","assignees_url":"https://api.github.com/repos/ankidroid/Anki-Android/assignees{/user}","branches_url":"https://api.github.com/repos/ankidroid/Anki-Android/branches{/branch}","tags_url":"https://api.github.com/repos/ankidroid/Anki-Android/tags","blobs_url":"https://api.github.com/repos/ankidroid/Anki-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ankidroid/Anki-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ankidroid/Anki-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/ankidroid/Anki-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ankidroid/Anki-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/ankidroid/Anki-Android/languages","stargazers_url":"https://api.github.com/repos/ankidroid/Anki-Android/stargazers","contributors_url":"https://api.github.com/repos/ankidroid/Anki-Android/contributors","subscribers_url":"https://api.github.com/repos/ankidroid/Anki-Android/subscribers","subscription_url":"https://api.github.com/repos/ankidroid/Anki-Android/subscription","commits_url":"https://api.github.com/repos/ankidroid/Anki-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/ankidroid/Anki-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/ankidroid/Anki-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/ankidroid/Anki-Android/contents/{+path}","compare_url":"https://api.github.com/repos/ankidroid/Anki-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ankidroid/Anki-Android/merges","archive_url":"https://api.github.com/repos/ankidroid/Anki-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ankidroid/Anki-Android/downloads","issues_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues{/number}","pulls_url":"https://api.github.com/repos/ankidroid/Anki-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/ankidroid/Anki-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/ankidroid/Anki-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ankidroid/Anki-Android/labels{/name}","releases_url":"https://api.github.com/repos/ankidroid/Anki-Android/releases{/id}","deployments_url":"https://api.github.com/repos/ankidroid/Anki-Android/deployments","created_at":"2013-01-20T13:55:53Z","updated_at":"2019-06-29T15:05:00Z","pushed_at":"2019-06-28T05:08:46Z","git_url":"git://github.com/ankidroid/Anki-Android.git","ssh_url":"git@github.com:ankidroid/Anki-Android.git","clone_url":"https://github.com/ankidroid/Anki-Android.git","svn_url":"https://github.com/ankidroid/Anki-Android","homepage":"","size":110946,"stargazers_count":1947,"watchers_count":1947,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":780,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":398,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":780,"open_issues":398,"watchers":1947,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/5355"},"html":{"href":"https://github.com/ankidroid/Anki-Android/pull/5355"},"issue":{"href":"https://api.github.com/repos/ankidroid/Anki-Android/issues/5355"},"comments":{"href":"https://api.github.com/repos/ankidroid/Anki-Android/issues/5355/comments"},"review_comments":{"href":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/5355/comments"},"review_comment":{"href":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/5355/commits"},"statuses":{"href":"https://api.github.com/repos/ankidroid/Anki-Android/statuses/06ea1bc65c07ef4d5114b8789aca02c03e9c7c65"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":21,"deletions":1,"changed_files":2}}
other: {"actor":{"display_login":"mikehardy"}}