-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Handles exception thrown when the theme has not been initialised yet #15311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.java
Show resolved
Hide resolved
|
You can test the changes on this Pull Request by downloading the APKs: |
Generated by 🚫 dangerJS |
develric
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @antonis 👋 , this LGTM! Even if not consistently, I was able to get the null from getEditorThemeForSite when using a pure self-hosted site on which I've opted out from Block Editor and especially when creating a post just after app starting up. Cannot be sure that is the only edge case, but regardless the fix worked for me 👍 .
I'll let you align with @AliSoftware to make this PR through the beta update, but let me know if any action needed from my side 🙇 .
mkevins
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @antonis , this LGTM! Even if not consistently, I was able to get the null from
getEditorThemeForSitewhen using a pure self-hosted site on which I've opted out from Block Editor and especially when creating a post just after app starting up. Cannot be sure that is the only edge case, but regardless the fix worked for me .I'll let you align with @AliSoftware to make this PR through the beta update, but let me know if any action needed from my side .
Thanks for testing this and finding steps to reproduce the original issue @develric . I had tried a few things to find steps, but nothing was reproducing it, I hadn't thought to opt out of the block editor on a self-hosted site.
Code looks good, thanks for fixing Antonis! 👍
|
This fix is now part of the new |
Fixes #15300
Based on #15308 and targeting
release/18.2Description
This PR fixes a
NullPointerExceptionintroduced in #15134To test:
I was not able to reproduce the conditions that lead to a crash. Thus I only validated the fix by triggering a
nullvalue for theeditorThemeat debug time.A few edge cases I tested include:
Regression Notes
Potential unintended areas of impact
N/A
What I did to test those areas of impact (or what existing automated tests I relied on)
N/A
What automated tests I added (or what prevented me from doing so)
The complexity of
EditPostActivitymakes it hard to add an automated tests for this part of the code.PR submission checklist:
RELEASE-NOTES.txtif necessary.