wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.92k stars 1.3k forks source link

Fix NullPointerException calling sendToJSPostSaveEvent #20677

Closed zwarm closed 3 weeks ago

zwarm commented 3 weeks ago

Fixes #20665

This PR introduces a null check for the activity. This change is made to prevent potential NullPointerExceptions that could occur if the activity is not available at the time of call.

We were unable to recreate this crash. See discussion p1713455342282519-slack-C012H19SZQ8 for the reasoning behind the solution implemented.


To Test:

Regression Notes

  1. Potential unintended areas of impact Edit/create post crashes

  2. What I did to test those areas of impact (or what existing automated tests I relied on) Manual testing

  3. What automated tests I added (or what prevented me from doing so) N/A


PR Submission Checklist:


Testing Checklist (strike-out the not-applying and unnecessary ones): N/A

dangermattic commented 3 weeks ago
1 Warning
:warning: This PR is assigned to the milestone 24.7 ❄️. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by :no_entry_sign: Danger

sonarcloud[bot] commented 3 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

wpmobilebot commented 3 weeks ago
Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr20677-d911084
Commitd9110848d567673babf282e545b95c9e5f294198
Direct Downloadjetpack-prototype-build-pr20677-d911084.apk
Note: Google Login is not supported on these builds.
wpmobilebot commented 3 weeks ago
WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr20677-d911084
Commitd9110848d567673babf282e545b95c9e5f294198
Direct Downloadwordpress-prototype-build-pr20677-d911084.apk
Note: Google Login is not supported on these builds.