Browse Source

Avoid unnecessary use of ResolvableType within MethodParameter

Closes gh-23792
pull/23891/head
Juergen Hoeller 6 years ago
parent
commit
dc59e50561
  1. 4
      spring-core/src/main/java/org/springframework/core/MethodParameter.java

4
spring-core/src/main/java/org/springframework/core/MethodParameter.java

@ -486,7 +486,9 @@ public class MethodParameter {
if (paramType != null) { if (paramType != null) {
return paramType; return paramType;
} }
paramType = ResolvableType.forMethodParameter(this, null, 1).resolve(); if (getContainingClass() != getDeclaringClass()) {
paramType = ResolvableType.forMethodParameter(this, null, 1).resolve();
}
if (paramType == null) { if (paramType == null) {
paramType = computeParameterType(); paramType = computeParameterType();
} }

Loading…
Cancel
Save