From 3429a4186cb6f0d303fb7ccc737cf1c7b2cc9f65 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 15 Jan 2014 15:16:01 +0100 Subject: [PATCH] Polishing --- .../main/java/org/springframework/util/MethodInvoker.java | 8 ++------ .../main/java/org/springframework/util/ObjectUtils.java | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/util/MethodInvoker.java b/spring-core/src/main/java/org/springframework/util/MethodInvoker.java index b1bd04ccb38..d2331caf098 100644 --- a/spring-core/src/main/java/org/springframework/util/MethodInvoker.java +++ b/spring-core/src/main/java/org/springframework/util/MethodInvoker.java @@ -28,10 +28,6 @@ import java.lang.reflect.Modifier; * optionally specify arguments, prepare the invoker. Afterwards, you may * invoke the method any number of times, obtaining the invocation result. * - *

Typically not used directly but via its subclasses - * {@link org.springframework.beans.factory.config.MethodInvokingFactoryBean} and - * {@link org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean}. - * * @author Colin Sampaleanu * @author Juergen Hoeller * @since 19.02.2004 @@ -168,7 +164,7 @@ public class MethodInvoker { } Object[] arguments = getArguments(); - Class[] argTypes = new Class[arguments.length]; + Class[] argTypes = new Class[arguments.length]; for (int i = 0; i < arguments.length; ++i) { argTypes[i] = (arguments[i] != null ? arguments[i].getClass() : Object.class); } @@ -216,7 +212,7 @@ public class MethodInvoker { for (Method candidate : candidates) { if (candidate.getName().equals(targetMethod)) { - Class[] paramTypes = candidate.getParameterTypes(); + Class[] paramTypes = candidate.getParameterTypes(); if (paramTypes.length == argCount) { int typeDiffWeight = getTypeDifferenceWeight(paramTypes, arguments); if (typeDiffWeight < minTypeDiffWeight) { diff --git a/spring-core/src/main/java/org/springframework/util/ObjectUtils.java b/spring-core/src/main/java/org/springframework/util/ObjectUtils.java index 09980f1e2ca..678de17b637 100644 --- a/spring-core/src/main/java/org/springframework/util/ObjectUtils.java +++ b/spring-core/src/main/java/org/springframework/util/ObjectUtils.java @@ -177,7 +177,7 @@ public abstract class ObjectUtils { * @param obj the object to append * @return the new array (of the same component type; never {@code null}) */ - public static A[] addObjectToArray(A[] array, O obj) { + public static A[] addObjectToArray(A[] array, O obj) { Class compType = Object.class; if (array != null) { compType = array.getClass().getComponentType();