{"action":"opened","number":929,"pull_request":{"url":"https://api.github.com/repos/selendroid/selendroid/pulls/929","id":38885468,"html_url":"https://github.com/selendroid/selendroid/pull/929","diff_url":"https://github.com/selendroid/selendroid/pull/929.diff","patch_url":"https://github.com/selendroid/selendroid/pull/929.patch","issue_url":"https://api.github.com/repos/selendroid/selendroid/issues/929","number":929,"state":"open","locked":false,"title":"[server] Fix NPE in ViewHierarchyAnalyzer","user":{"login":"asm89","id":657357,"avatar_url":"https://avatars.githubusercontent.com/u/657357?v=3","gravatar_id":"","url":"https://api.github.com/users/asm89","html_url":"https://github.com/asm89","followers_url":"https://api.github.com/users/asm89/followers","following_url":"https://api.github.com/users/asm89/following{/other_user}","gists_url":"https://api.github.com/users/asm89/gists{/gist_id}","starred_url":"https://api.github.com/users/asm89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asm89/subscriptions","organizations_url":"https://api.github.com/users/asm89/orgs","repos_url":"https://api.github.com/users/asm89/repos","events_url":"https://api.github.com/users/asm89/events{/privacy}","received_events_url":"https://api.github.com/users/asm89/received_events","type":"User","site_admin":false},"body":"Summary: We are seeing cases where we're querying native elements, but\r\nthere is no current activity. Previously this would result in a\r\n`NullPointerException` in the `ViewHierarchyAnalyzer`. This changes\r\nfixes the exception and adds a fallback when looking for resources:\r\n\r\n- added a check to see if the activity is `null`\r\n- if that's the case, try to get the resources from the passed view\r\n- before getting trying to get the resource name, check if the resources\r\n  returned are non null (we've seen that case as well)\r\n\r\nTest Plan: Ran our internal e2e tests against selendroid with this\r\npatch.","created_at":"2015-06-30T14:42:51Z","updated_at":"2015-06-30T14:42:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/selendroid/selendroid/pulls/929/commits","review_comments_url":"https://api.github.com/repos/selendroid/selendroid/pulls/929/comments","review_comment_url":"https://api.github.com/repos/selendroid/selendroid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/selendroid/selendroid/issues/929/comments","statuses_url":"https://api.github.com/repos/selendroid/selendroid/statuses/3b2acdfeff6b0221856279e06510b3b0672f3812","head":{"label":"asm89:fix-npe-in-viewhierarchyanalyzer","ref":"fix-npe-in-viewhierarchyanalyzer","sha":"3b2acdfeff6b0221856279e06510b3b0672f3812","user":{"login":"asm89","id":657357,"avatar_url":"https://avatars.githubusercontent.com/u/657357?v=3","gravatar_id":"","url":"https://api.github.com/users/asm89","html_url":"https://github.com/asm89","followers_url":"https://api.github.com/users/asm89/followers","following_url":"https://api.github.com/users/asm89/following{/other_user}","gists_url":"https://api.github.com/users/asm89/gists{/gist_id}","starred_url":"https://api.github.com/users/asm89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asm89/subscriptions","organizations_url":"https://api.github.com/users/asm89/orgs","repos_url":"https://api.github.com/users/asm89/repos","events_url":"https://api.github.com/users/asm89/events{/privacy}","received_events_url":"https://api.github.com/users/asm89/received_events","type":"User","site_admin":false},"repo":{"id":35555344,"name":"selendroid","full_name":"asm89/selendroid","owner":{"login":"asm89","id":657357,"avatar_url":"https://avatars.githubusercontent.com/u/657357?v=3","gravatar_id":"","url":"https://api.github.com/users/asm89","html_url":"https://github.com/asm89","followers_url":"https://api.github.com/users/asm89/followers","following_url":"https://api.github.com/users/asm89/following{/other_user}","gists_url":"https://api.github.com/users/asm89/gists{/gist_id}","starred_url":"https://api.github.com/users/asm89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asm89/subscriptions","organizations_url":"https://api.github.com/users/asm89/orgs","repos_url":"https://api.github.com/users/asm89/repos","events_url":"https://api.github.com/users/asm89/events{/privacy}","received_events_url":"https://api.github.com/users/asm89/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/asm89/selendroid","description":"\"Selenium for Android\" (Test automate native or hybrid Android apps and the mobile web with Selendroid.) Join us on IRC #selendroid on freenode. Also confirm you have signed the CLA http://goo.gl/pAvxEI when making a Pull Request.","fork":true,"url":"https://api.github.com/repos/asm89/selendroid","forks_url":"https://api.github.com/repos/asm89/selendroid/forks","keys_url":"https://api.github.com/repos/asm89/selendroid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asm89/selendroid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asm89/selendroid/teams","hooks_url":"https://api.github.com/repos/asm89/selendroid/hooks","issue_events_url":"https://api.github.com/repos/asm89/selendroid/issues/events{/number}","events_url":"https://api.github.com/repos/asm89/selendroid/events","assignees_url":"https://api.github.com/repos/asm89/selendroid/assignees{/user}","branches_url":"https://api.github.com/repos/asm89/selendroid/branches{/branch}","tags_url":"https://api.github.com/repos/asm89/selendroid/tags","blobs_url":"https://api.github.com/repos/asm89/selendroid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asm89/selendroid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asm89/selendroid/git/refs{/sha}","trees_url":"https://api.github.com/repos/asm89/selendroid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asm89/selendroid/statuses/{sha}","languages_url":"https://api.github.com/repos/asm89/selendroid/languages","stargazers_url":"https://api.github.com/repos/asm89/selendroid/stargazers","contributors_url":"https://api.github.com/repos/asm89/selendroid/contributors","subscribers_url":"https://api.github.com/repos/asm89/selendroid/subscribers","subscription_url":"https://api.github.com/repos/asm89/selendroid/subscription","commits_url":"https://api.github.com/repos/asm89/selendroid/commits{/sha}","git_commits_url":"https://api.github.com/repos/asm89/selendroid/git/commits{/sha}","comments_url":"https://api.github.com/repos/asm89/selendroid/comments{/number}","issue_comment_url":"https://api.github.com/repos/asm89/selendroid/issues/comments{/number}","contents_url":"https://api.github.com/repos/asm89/selendroid/contents/{+path}","compare_url":"https://api.github.com/repos/asm89/selendroid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asm89/selendroid/merges","archive_url":"https://api.github.com/repos/asm89/selendroid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asm89/selendroid/downloads","issues_url":"https://api.github.com/repos/asm89/selendroid/issues{/number}","pulls_url":"https://api.github.com/repos/asm89/selendroid/pulls{/number}","milestones_url":"https://api.github.com/repos/asm89/selendroid/milestones{/number}","notifications_url":"https://api.github.com/repos/asm89/selendroid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asm89/selendroid/labels{/name}","releases_url":"https://api.github.com/repos/asm89/selendroid/releases{/id}","created_at":"2015-05-13T14:54:45Z","updated_at":"2015-05-13T14:54:47Z","pushed_at":"2015-06-30T14:41:39Z","git_url":"git://github.com/asm89/selendroid.git","ssh_url":"git@github.com:asm89/selendroid.git","clone_url":"https://github.com/asm89/selendroid.git","svn_url":"https://github.com/asm89/selendroid","homepage":"http://selendroid.io","size":15152,"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":"selendroid:master","ref":"master","sha":"965a0b879ba184b8269411f96afb4e8b340d4ccf","user":{"login":"selendroid","id":3197580,"avatar_url":"https://avatars.githubusercontent.com/u/3197580?v=3","gravatar_id":"","url":"https://api.github.com/users/selendroid","html_url":"https://github.com/selendroid","followers_url":"https://api.github.com/users/selendroid/followers","following_url":"https://api.github.com/users/selendroid/following{/other_user}","gists_url":"https://api.github.com/users/selendroid/gists{/gist_id}","starred_url":"https://api.github.com/users/selendroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/selendroid/subscriptions","organizations_url":"https://api.github.com/users/selendroid/orgs","repos_url":"https://api.github.com/users/selendroid/repos","events_url":"https://api.github.com/users/selendroid/events{/privacy}","received_events_url":"https://api.github.com/users/selendroid/received_events","type":"Organization","site_admin":false},"repo":{"id":7465720,"name":"selendroid","full_name":"selendroid/selendroid","owner":{"login":"selendroid","id":3197580,"avatar_url":"https://avatars.githubusercontent.com/u/3197580?v=3","gravatar_id":"","url":"https://api.github.com/users/selendroid","html_url":"https://github.com/selendroid","followers_url":"https://api.github.com/users/selendroid/followers","following_url":"https://api.github.com/users/selendroid/following{/other_user}","gists_url":"https://api.github.com/users/selendroid/gists{/gist_id}","starred_url":"https://api.github.com/users/selendroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/selendroid/subscriptions","organizations_url":"https://api.github.com/users/selendroid/orgs","repos_url":"https://api.github.com/users/selendroid/repos","events_url":"https://api.github.com/users/selendroid/events{/privacy}","received_events_url":"https://api.github.com/users/selendroid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/selendroid/selendroid","description":"\"Selenium for Android\" (Test automate native or hybrid Android apps and the mobile web with Selendroid.) Join us on IRC #selendroid on freenode. Also confirm you have signed the CLA http://goo.gl/pAvxEI when making a Pull Request.","fork":false,"url":"https://api.github.com/repos/selendroid/selendroid","forks_url":"https://api.github.com/repos/selendroid/selendroid/forks","keys_url":"https://api.github.com/repos/selendroid/selendroid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/selendroid/selendroid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/selendroid/selendroid/teams","hooks_url":"https://api.github.com/repos/selendroid/selendroid/hooks","issue_events_url":"https://api.github.com/repos/selendroid/selendroid/issues/events{/number}","events_url":"https://api.github.com/repos/selendroid/selendroid/events","assignees_url":"https://api.github.com/repos/selendroid/selendroid/assignees{/user}","branches_url":"https://api.github.com/repos/selendroid/selendroid/branches{/branch}","tags_url":"https://api.github.com/repos/selendroid/selendroid/tags","blobs_url":"https://api.github.com/repos/selendroid/selendroid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/selendroid/selendroid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/selendroid/selendroid/git/refs{/sha}","trees_url":"https://api.github.com/repos/selendroid/selendroid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/selendroid/selendroid/statuses/{sha}","languages_url":"https://api.github.com/repos/selendroid/selendroid/languages","stargazers_url":"https://api.github.com/repos/selendroid/selendroid/stargazers","contributors_url":"https://api.github.com/repos/selendroid/selendroid/contributors","subscribers_url":"https://api.github.com/repos/selendroid/selendroid/subscribers","subscription_url":"https://api.github.com/repos/selendroid/selendroid/subscription","commits_url":"https://api.github.com/repos/selendroid/selendroid/commits{/sha}","git_commits_url":"https://api.github.com/repos/selendroid/selendroid/git/commits{/sha}","comments_url":"https://api.github.com/repos/selendroid/selendroid/comments{/number}","issue_comment_url":"https://api.github.com/repos/selendroid/selendroid/issues/comments{/number}","contents_url":"https://api.github.com/repos/selendroid/selendroid/contents/{+path}","compare_url":"https://api.github.com/repos/selendroid/selendroid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/selendroid/selendroid/merges","archive_url":"https://api.github.com/repos/selendroid/selendroid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/selendroid/selendroid/downloads","issues_url":"https://api.github.com/repos/selendroid/selendroid/issues{/number}","pulls_url":"https://api.github.com/repos/selendroid/selendroid/pulls{/number}","milestones_url":"https://api.github.com/repos/selendroid/selendroid/milestones{/number}","notifications_url":"https://api.github.com/repos/selendroid/selendroid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/selendroid/selendroid/labels{/name}","releases_url":"https://api.github.com/repos/selendroid/selendroid/releases{/id}","created_at":"2013-01-06T08:29:32Z","updated_at":"2015-06-29T18:05:43Z","pushed_at":"2015-06-30T14:42:51Z","git_url":"git://github.com/selendroid/selendroid.git","ssh_url":"git@github.com:selendroid/selendroid.git","clone_url":"https://github.com/selendroid/selendroid.git","svn_url":"https://github.com/selendroid/selendroid","homepage":"http://selendroid.io","size":20136,"stargazers_count":363,"watchers_count":363,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":239,"mirror_url":null,"open_issues_count":20,"forks":239,"open_issues":20,"watchers":363,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/selendroid/selendroid/pulls/929"},"html":{"href":"https://github.com/selendroid/selendroid/pull/929"},"issue":{"href":"https://api.github.com/repos/selendroid/selendroid/issues/929"},"comments":{"href":"https://api.github.com/repos/selendroid/selendroid/issues/929/comments"},"review_comments":{"href":"https://api.github.com/repos/selendroid/selendroid/pulls/929/comments"},"review_comment":{"href":"https://api.github.com/repos/selendroid/selendroid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/selendroid/selendroid/pulls/929/commits"},"statuses":{"href":"https://api.github.com/repos/selendroid/selendroid/statuses/3b2acdfeff6b0221856279e06510b3b0672f3812"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":14,"deletions":5,"changed_files":1}}