Re-implemented the toObjectArray method using System.arraycopy.

This commit is contained in:
John Blum
2014-07-08 00:16:27 -07:00
parent e2fc636ef3
commit fffa64c3a7

View File

@@ -38,13 +38,7 @@ class DefaultFunctionArgumentResolver implements FunctionArgumentResolver {
private Object[] toObjectArray(final Object[] arguments) {
Object[] result = new Object[arguments.length];
int index = 0;
for (Object arg : arguments) {
result[index++] = arg;
}
System.arraycopy(arguments, 0, result, 0, arguments.length);
return result;
}