diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java
index f290d51b186..244c2b2b973 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2014 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.
@@ -54,12 +54,9 @@ import org.springframework.util.ReflectionUtils;
import org.springframework.util.StringUtils;
/**
- * Helper class for resolving constructors and factory methods.
+ * Delegate for resolving constructors and factory methods.
* Performs constructor resolution through argument matching.
*
- *
Operates on an {@link AbstractBeanFactory} and an {@link InstantiationStrategy}.
- * Used by {@link AbstractAutowireCapableBeanFactory}.
- *
* @author Juergen Hoeller
* @author Rob Harrop
* @author Mark Fisher
@@ -103,12 +100,12 @@ class ConstructorResolver {
* @return a BeanWrapper for the new instance
*/
public BeanWrapper autowireConstructor(
- final String beanName, final RootBeanDefinition mbd, Constructor[] chosenCtors, final Object[] explicitArgs) {
+ final String beanName, final RootBeanDefinition mbd, Constructor>[] chosenCtors, final Object[] explicitArgs) {
BeanWrapperImpl bw = new BeanWrapperImpl();
this.beanFactory.initBeanWrapper(bw);
- Constructor constructorToUse = null;
+ Constructor> constructorToUse = null;
ArgumentsHolder argsHolderToUse = null;
Object[] argsToUse = null;
@@ -118,7 +115,7 @@ class ConstructorResolver {
else {
Object[] argsToResolve = null;
synchronized (mbd.constructorArgumentLock) {
- constructorToUse = (Constructor) mbd.resolvedConstructorOrFactoryMethod;
+ constructorToUse = (Constructor>) mbd.resolvedConstructorOrFactoryMethod;
if (constructorToUse != null && mbd.constructorArgumentsResolved) {
// Found a cached constructor...
argsToUse = mbd.resolvedConstructorArguments;
@@ -149,7 +146,7 @@ class ConstructorResolver {
}
// Take specified constructors, if any.
- Constructor[] candidates = chosenCtors;
+ Constructor>[] candidates = chosenCtors;
if (candidates == null) {
Class> beanClass = mbd.getBeanClass();
try {
@@ -164,7 +161,7 @@ class ConstructorResolver {
}
AutowireUtils.sortConstructors(candidates);
int minTypeDiffWeight = Integer.MAX_VALUE;
- Set ambiguousConstructors = null;
+ Set> ambiguousConstructors = null;
List causes = null;
for (int i = 0; i < candidates.length; i++) {
@@ -185,7 +182,7 @@ class ConstructorResolver {
try {
String[] paramNames = null;
if (constructorPropertiesAnnotationAvailable) {
- paramNames = ConstructorPropertiesChecker.evaluateAnnotation(candidate, paramTypes.length);
+ paramNames = ConstructorPropertiesChecker.evaluate(candidate, paramTypes.length);
}
if (paramNames == null) {
ParameterNameDiscoverer pnd = this.beanFactory.getParameterNameDiscoverer();
@@ -239,7 +236,7 @@ class ConstructorResolver {
}
else if (constructorToUse != null && typeDiffWeight == minTypeDiffWeight) {
if (ambiguousConstructors == null) {
- ambiguousConstructors = new LinkedHashSet();
+ ambiguousConstructors = new LinkedHashSet>();
ambiguousConstructors.add(constructorToUse);
}
ambiguousConstructors.add(candidate);
@@ -267,7 +264,7 @@ class ConstructorResolver {
Object beanInstance;
if (System.getSecurityManager() != null) {
- final Constructor ctorToUse = constructorToUse;
+ final Constructor> ctorToUse = constructorToUse;
final Object[] argumentsToUse = argsToUse;
beanInstance = AccessController.doPrivileged(new PrivilegedAction