Skip to content

Fix: Unable to receive null response from Cloud Code #32

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

Merged
merged 2 commits into from
Aug 19, 2015

Conversation

grantland
Copy link
Contributor

res.success(null) from Cloud Code caused ParseCloud.callFunctionInBackground() to return a JSONObject, which would result in ClassCastException in developer code since they would normally expect a String or something.

This change fixes that.

/cc @hallucinogen @wangmengyan95 @nlutsenko

`res.success(null)` from Cloud Code caused `ParseCloud.callFunctionInBackground()` to return a JSONObject, which would result in `ClassCastException` in developer code since they would normally expect a `String` or something.

This change fixes that.
@grantland grantland added type:bug Impaired feature or lacking behavior that is likely assumed needs review labels Aug 18, 2015
result = jsonResult.get("result");
} catch (JSONException e) {
return result;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

jsonResult.get("result") would throw a JSONException, which caused this function to return {} instead of null

@grantland grantland added this to the 1.10.1 milestone Aug 19, 2015
@wangmengyan95
Copy link
Contributor

LGTM

grantland added a commit that referenced this pull request Aug 19, 2015
Fix: Unable to receive null response from Cloud Code
@grantland grantland merged commit 19e175a into master Aug 19, 2015
@grantland grantland deleted the grantland.cloud branch August 19, 2015 00:22
@facebook-github-bot
Copy link

@grantland updated the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants