Fix a NullPointerException

This commit is contained in:
Tumi 2013-12-24 15:38:46 +01:00
parent a84f49f26a
commit 2c80473aaf

View File

@ -1,4 +1,3 @@
package com.esotericsoftware.reflectasm;
import java.lang.reflect.Method;
@ -27,7 +26,7 @@ public abstract class MethodAccess {
/** Invokes the first method with the specified name and the specified number of arguments. */
public Object invoke (Object object, String methodName, Object... args) {
return invoke(object, getIndex(methodName, args.length), args);
return invoke(object, getIndex(methodName, args==null ? 0 : args.length), args);
}
/** Returns the index of the first method with the specified name. */