Skip to content

Conversation

@gvaibhav1734
Copy link
Contributor

Description
Fixes #3730

What changes did you make and why?
Added a null check to prevent Null Pointer Exception when user clicks on image in MediaDetailFragment.

Tests performed (required)
Tested on {prodDebug, betaDebug} on {Pixel 2 emulator} with API level {28}.

Copy link

@tests-checker tests-checker bot left a comment

Choose a reason for hiding this comment

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

Could you please add tests to make sure this change works as expected?

@codecov-io
Copy link

Codecov Report

Merging #3738 into master will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master   #3738      +/-   ##
===========================================
- Coverage      7.38%   7.38%   -0.01%     
  Complexity      340     340              
===========================================
  Files           290     290              
  Lines         12821   12822       +1     
  Branches       1004    1004              
===========================================
  Hits            947     947              
- Misses        11799   11800       +1     
  Partials         75      75              
Impacted Files Coverage Δ Complexity Δ
...fr/free/nrw/commons/media/MediaDetailFragment.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc6a3e5...71e8d6d. Read the comment docs.

@ashishkumar468
Copy link
Collaborator

Fixes the issue for me, thanks for the PR @gvaibhav1734

@ashishkumar468 ashishkumar468 merged commit 11ff5fb into commons-app:master May 8, 2020
ashishkumar468 pushed a commit to ashishkumar468/apps-android-commons that referenced this pull request May 8, 2020
…s-app#3730) (commons-app#3738)

Uri.parse would throw NullPointerException if the image in MediaDetailFragment was clicked before the image URL is available
ashishkumar468 pushed a commit to ashishkumar468/apps-android-commons that referenced this pull request Oct 10, 2020
…s-app#3730) (commons-app#3738)

Uri.parse would throw NullPointerException if the image in MediaDetailFragment was clicked before the image URL is available
ashishkumar468 pushed a commit to ashishkumar468/apps-android-commons that referenced this pull request Oct 10, 2020
…s-app#3730) (commons-app#3738)

Uri.parse would throw NullPointerException if the image in MediaDetailFragment was clicked before the image URL is available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NullPointerException when you click on image in MediaDetailFragment

3 participants