Polishing
This commit is contained in:
@@ -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.
|
||||
*
|
||||
* <p>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) {
|
||||
|
||||
@@ -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,O extends A> A[] addObjectToArray(A[] array, O obj) {
|
||||
public static <A, O extends A> A[] addObjectToArray(A[] array, O obj) {
|
||||
Class<?> compType = Object.class;
|
||||
if (array != null) {
|
||||
compType = array.getClass().getComponentType();
|
||||
|
||||
Reference in New Issue
Block a user