Browse Source

Polishing

pull/465/head
Juergen Hoeller 12 years ago
parent
commit
3429a4186c
  1. 8
      spring-core/src/main/java/org/springframework/util/MethodInvoker.java
  2. 2
      spring-core/src/main/java/org/springframework/util/ObjectUtils.java

8
spring-core/src/main/java/org/springframework/util/MethodInvoker.java

@ -28,10 +28,6 @@ import java.lang.reflect.Modifier; @@ -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 { @@ -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 { @@ -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) {

2
spring-core/src/main/java/org/springframework/util/ObjectUtils.java

@ -177,7 +177,7 @@ public abstract class ObjectUtils { @@ -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();

Loading…
Cancel
Save