LambdaFunction may cause NPE.
son-daehyeon opened this issue · 2 comments
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
int argsLength = args == null ? 0 : args.length;
if(parameters.length != argsLength)
throw new InterpreterException("Number of Lambda parameters doesn't match. Caller provided "+args.length+"" +
" arguments, yet the LAMBDA only has "+parameters.length+" ids. "+body);
// initialize arguments as variables in the lambda
for (int i = 0; i < parameters.length; i++) {
lambdaBody.getVars().put(parameters[i].id, args[i]);
}
lambdaBody.start();
return lambdaBody.result();
}
6번째 줄에서 Caller provided + args.length + arguments
부분에서 args는 null일 수도 있습니다.
fix in #547