jonan/ForkHub

App crashes when trying to display a PR review requested not from a specific user but from code owners

michpohl opened this issue · 0 comments

In a Github project that is set to auto-request reviews for new pull requests from all code owners, the app crashes in EventListAdapter.java line 172 when no other reviewer was specified.

This is because in that case it tries to display a user name, but there is none. event.requested_reviewer.loginis null, so the app breaks.

This is the log (shortened for clarity):

2020-02-23 19:05:53.803 29922-29922/jp.forkhub E/AndroidRuntime: FATAL EXCEPTION: main
    Process: jp.forkhub, PID: 29922
    java.lang.NullPointerException: Attempt to read from field 'java.lang.String com.github.mobile.api.model.User.login' on a null object reference
        at com.github.mobile.ui.issue.EventListAdapter.updateEvent(EventListAdapter.java:172)
        at com.github.mobile.ui.issue.EventListAdapter.update(EventListAdapter.java:100)