Skip to content
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

[CB-2666] Added check for null arguments. #39

Merged
merged 1 commit into from
Apr 4, 2013

Conversation

mwoghiren
Copy link
Contributor

If null arguments are received, send an error and an explanation.

// If the arguments didn't get sent properly, switch bridge modes and try again.
if (arguments == null) {
PluginResult pluginResult = new PluginResult(PluginResult.Status.ERROR, "Null arguments");
jsMessageQueue.addPluginResult(pluginResult, callbackId);
Copy link
Contributor

Choose a reason for hiding this comment

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

Using a plugin result makes it so that the JS side can't distinguish this special-case from an actual plugin-response.

Instead, I think we can do:
if (arguments == null) {
return "null args";
}

If null arguments are received, send an error and an explanation.
@asfgit asfgit merged commit 1fa6330 into apache:master Apr 4, 2013
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.

3 participants