diff --git a/spring-core/src/main/java/org/springframework/core/MethodParameter.java b/spring-core/src/main/java/org/springframework/core/MethodParameter.java index 6c1e1068d0d53010f0d2c5122a23ccbf7c7a8b0c..f0125002246025d46cb94110414425a42d68d969 100644 --- a/spring-core/src/main/java/org/springframework/core/MethodParameter.java +++ b/spring-core/src/main/java/org/springframework/core/MethodParameter.java @@ -486,7 +486,9 @@ public class MethodParameter { if (paramType != null) { return paramType; } - paramType = ResolvableType.forMethodParameter(this, null, 1).resolve(); + if (getContainingClass() != getDeclaringClass()) { + paramType = ResolvableType.forMethodParameter(this, null, 1).resolve(); + } if (paramType == null) { paramType = computeParameterType(); }