Provider declaration for @Value method argument works again

Issue: SPR-12297
This commit is contained in:
Juergen Hoeller
2014-10-06 18:08:19 +02:00
parent 9d832816a8
commit 70fec47944
3 changed files with 147 additions and 48 deletions

View File

@@ -74,9 +74,6 @@ public class TypeDescriptor implements Serializable {
*/
public TypeDescriptor(MethodParameter methodParameter) {
Assert.notNull(methodParameter, "MethodParameter must not be null");
if (methodParameter.getNestingLevel() != 1) {
throw new IllegalArgumentException("MethodParameter argument must have its nestingLevel set to 1");
}
this.resolvableType = ResolvableType.forMethodParameter(methodParameter);
this.type = this.resolvableType.resolve(methodParameter.getParameterType());
this.annotations = (methodParameter.getParameterIndex() == -1 ?