Avoid use of GenericTypeResolver.resolveParameterType() in tests
This commit avoids the use of the deprecated GenericTypeResolver.resolveParameterType() method in tests in order to avoid warnings in the Gradle build.
This commit is contained in:
@@ -25,7 +25,6 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.core.DefaultParameterNameDiscoverer;
|
||||
import org.springframework.core.GenericTypeResolver;
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.core.annotation.SynthesizingMethodParameter;
|
||||
import org.springframework.core.convert.support.DefaultConversionService;
|
||||
@@ -153,8 +152,7 @@ public abstract class AbstractRequestAttributesArgumentResolverTests {
|
||||
private MethodParameter initMethodParameter(int parameterIndex) {
|
||||
MethodParameter param = new SynthesizingMethodParameter(this.handleMethod, parameterIndex);
|
||||
param.initParameterNameDiscovery(new DefaultParameterNameDiscoverer());
|
||||
GenericTypeResolver.resolveParameterType(param, this.resolver.getClass());
|
||||
return param;
|
||||
return param.withContainingClass(this.resolver.getClass());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user