Skip to content

Commit 45b7c9c

Browse files
committed
Handle calling callLambdaFunction with null arguments
1 parent d0d3cb4 commit 45b7c9c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

skygear/src/main/java/io/skygear/skygear/Container.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ public void callLambdaFunction(String name, LambdaResponseHandler handler) {
216216
* @param handler the response handler
217217
*/
218218
public void callLambdaFunction(final String name, Object[] args, LambdaResponseHandler handler) {
219+
if (args == null) {
220+
this.callLambdaFunction(name, handler);
221+
return;
222+
}
219223
final String lambdaName = name;
220224
final Object[] lambdaArgs = args;
221225
final LambdaResponseHandler responseHandler = handler;
@@ -243,6 +247,10 @@ public void onFailure(Error error) {
243247
* @param handler the response handler
244248
*/
245249
public void callLambdaFunction(String name, Map<String, Object> args, LambdaResponseHandler handler) {
250+
if (args == null) {
251+
this.callLambdaFunction(name, handler);
252+
return;
253+
}
246254
final String lambdaName = name;
247255
final Map<String, Object> lambdaArgs = args;
248256
final LambdaResponseHandler responseHandler = handler;

0 commit comments

Comments
 (0)