Skip to content

Fix crash when reading from ReaderPost JSON#10861

Merged
develric merged 1 commit intodevelopfrom
fix/crash_when_reading_from_reader_post_json
Nov 27, 2019
Merged

Fix crash when reading from ReaderPost JSON#10861
develric merged 1 commit intodevelopfrom
fix/crash_when_reading_from_reader_post_json

Conversation

@planarvoid
Copy link
Copy Markdown
Contributor

Fixes #10573

This PR adds a non-null check when reading data from JSON in ReaderPost.

To test:

  • I don't know how to reproduce this issue but the check should be straightforward

PR submission checklist:

  • I have considered adding unit tests where possible.

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@planarvoid planarvoid added this to the 13.8 milestone Nov 27, 2019
@planarvoid planarvoid requested a review from develric November 27, 2019 10:31
@planarvoid planarvoid self-assigned this Nov 27, 2019
@peril-wordpress-mobile
Copy link
Copy Markdown

You can test the changes on this Pull Request by downloading the APK here.

Copy link
Copy Markdown
Contributor

@develric develric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @planarvoid , was also not able to imagine a way to create a test scenario for this one, but agree the check seems safe to assume and should fix the issue. :shipit:

@develric develric merged commit a921a9c into develop Nov 27, 2019
@develric develric deleted the fix/crash_when_reading_from_reader_post_json branch November 27, 2019 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NullPointerException: Attempt to invoke virtual method 'java.lang.String org.json.JSONObject.optString(java.lang.String...

2 participants