Fix whitespaces, add missing @since tag

This commit is contained in:
Benedikt Ritter 2016-09-11 16:06:32 +02:00
parent d0049e1ac3
commit ab60f735c7
1 changed files with 52 additions and 51 deletions

View File

@ -194,6 +194,7 @@ public class MethodUtils {
* @throws NoSuchMethodException if there is no such accessible method * @throws NoSuchMethodException if there is no such accessible method
* @throws InvocationTargetException wraps an exception thrown by the method invoked * @throws InvocationTargetException wraps an exception thrown by the method invoked
* @throws IllegalAccessException if the requested method is not accessible via reflection * @throws IllegalAccessException if the requested method is not accessible via reflection
* @since 3.5
*/ */
public static Object invokeMethod(final Object object, final boolean forceAccess, final String methodName, public static Object invokeMethod(final Object object, final boolean forceAccess, final String methodName,
Object[] args, Class<?>[] parameterTypes) Object[] args, Class<?>[] parameterTypes)
@ -731,12 +732,12 @@ public class MethodUtils {
// Address methods in superclasses // Address methods in superclasses
Method[] methodArray = cls.getDeclaredMethods(); Method[] methodArray = cls.getDeclaredMethods();
List<Class<?>> superclassList = ClassUtils.getAllSuperclasses(cls); List<Class<?>> superclassList = ClassUtils.getAllSuperclasses(cls);
for (Class<?> klass: superclassList) { for (Class<?> klass : superclassList) {
methodArray = ArrayUtils.addAll(methodArray, klass.getDeclaredMethods()); methodArray = ArrayUtils.addAll(methodArray, klass.getDeclaredMethods());
} }
Method inexactMatch = null; Method inexactMatch = null;
for (Method method: methodArray) { for (Method method : methodArray) {
if (methodName.equals(method.getName()) && if (methodName.equals(method.getName()) &&
ArrayUtils.isEquals(parameterTypes, method.getParameterTypes())) { ArrayUtils.isEquals(parameterTypes, method.getParameterTypes())) {
return method; return method;