Skip to content

BugFix invalid upload count string #2989

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

ashishkumar468
Copy link
Collaborator

  • Added non empty check in response.body() in OkHttpJsonApiClient$getUploadCount

Description (required)

Fixes #2987 App crashes when response body is empty [but not null] in getUploadCount()

What changes did you make and why?
Added non-empty check in response.body() in getUploadCount()
Tests performed (required)

Tested {ProdDebug} on Samsung S6 with Api Level 27

Screenshots showing what changed (optional - for UI changes)

NA

* Added non empty check in response.body() in OkHttpJsonApiClient$getUploadCount
Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

✅ A review job has been created and sent to the PullRequest network.


Check the status or cancel PullRequest code review here.

@neslihanturan
Copy link
Collaborator

Thanks a lot for very fast Pr @ashishkumar0207 . I see this error:

2019-06-04 15:41:05.182 5218-5218/fr.free.nrw.commons E/AchievementsActivity: Error:java.lang.NullPointerException: Attempt to invoke virtual method 'int fr.free.nrw.commons.wikidata.model.GetWikidataEditCountResponse.getWikidataEditCount()' on a null object reference

And my achievement says I have no contributions on prod debug.

@ashishkumar468
Copy link
Collaborator Author

ashishkumar468 commented Jun 4, 2019

This is

Thanks a lot for very fast Pr @ashishkumar0207 . I see this error:

2019-06-04 15:41:05.182 5218-5218/fr.free.nrw.commons E/AchievementsActivity: Error:java.lang.NullPointerException: Attempt to invoke virtual method 'int fr.free.nrw.commons.wikidata.model.GetWikidataEditCountResponse.getWikidataEditCount()' on a null object reference

And my achievement says I have no contributions on prod debug.

@neslihanturan This seems to be unrelated to this PR, this PR fixes the issue with UploadCount, while this error is related with WikidataEditResponse, shall we create a separate issue for it ?

@neslihanturan neslihanturan merged commit c4f159e into commons-app:master Jun 4, 2019
@ashishkumar468 ashishkumar468 deleted the bugfix/invalid-upload-count-string branch June 4, 2019 12:59
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.

App crashes when response body is empty [but not null] in getUploadCount()
2 participants