-
-
Notifications
You must be signed in to change notification settings - Fork 735
[android] Remove ParseRequest defaultClient #180
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
We do not need defaultClient as a global state in class ParseRequest anymore.
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.
This defeats the purpose of injection as it makes it difficult to unit test execution paths that use this method.
In reality, we should be passing the client through to anything that was using ParseRequest#executeAsync() and ParseRequest#executeAsync(ProgressCallback, ProgressCallback, CancellationToken).
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.
nit: let's grab restClient once and reuse the same variable
|
Could you also see if this resolves #37? |
|
LGTM, mind squashing? |
|
Squashed in #214 |
|
@YaoPersonal updated the pull request. |
We do not need defaultClient as a global state in class ParseRequest anymore.