Polishing
This commit is contained in:
@@ -272,7 +272,7 @@ abstract class AutowireUtils {
|
||||
|
||||
|
||||
/**
|
||||
* Reflective InvocationHandler for lazy access to the current target object.
|
||||
* Reflective {@link InvocationHandler} for lazy access to the current target object.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
private static class ObjectFactoryDelegatingInvocationHandler implements InvocationHandler, Serializable {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -287,7 +287,7 @@ class ConstructorResolver {
|
||||
}
|
||||
|
||||
private Object instantiate(
|
||||
String beanName, RootBeanDefinition mbd, Constructor constructorToUse, Object[] argsToUse) {
|
||||
String beanName, RootBeanDefinition mbd, Constructor<?> constructorToUse, Object[] argsToUse) {
|
||||
|
||||
try {
|
||||
InstantiationStrategy strategy = this.beanFactory.getInstantiationStrategy();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,6 +27,8 @@ import org.springframework.util.ReflectionUtils;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link AutowireUtils}.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @author Sam Brannen
|
||||
*/
|
||||
@@ -36,7 +38,7 @@ public class AutowireUtilsTests {
|
||||
public void genericMethodReturnTypes() {
|
||||
Method notParameterized = ReflectionUtils.findMethod(MyTypeWithMethods.class, "notParameterized");
|
||||
assertEquals(String.class,
|
||||
AutowireUtils.resolveReturnTypeForFactoryMethod(notParameterized, new Object[]{}, getClass().getClassLoader()));
|
||||
AutowireUtils.resolveReturnTypeForFactoryMethod(notParameterized, new Object[0], getClass().getClassLoader()));
|
||||
|
||||
Method notParameterizedWithArguments = ReflectionUtils.findMethod(MyTypeWithMethods.class, "notParameterizedWithArguments", Integer.class, Boolean.class);
|
||||
assertEquals(String.class,
|
||||
|
||||
Reference in New Issue
Block a user