Deprecate mutable methods of MethodParameter
Deprecate all mutation methods in `MethodParameter` in favor of factory methods that return a new instance. Existing code that previously relied on mutation has been updated to use the replacement methods. Closes gh-23385
This commit is contained in:
@@ -30,7 +30,6 @@ import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.core.BridgeMethodResolver;
|
||||
import org.springframework.core.GenericTypeResolver;
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.core.ResolvableType;
|
||||
import org.springframework.core.annotation.AnnotatedElementUtils;
|
||||
@@ -188,9 +187,7 @@ public class HandlerMethod {
|
||||
int count = this.bridgedMethod.getParameterCount();
|
||||
MethodParameter[] result = new MethodParameter[count];
|
||||
for (int i = 0; i < count; i++) {
|
||||
HandlerMethodParameter parameter = new HandlerMethodParameter(i);
|
||||
GenericTypeResolver.resolveParameterType(parameter, this.beanType);
|
||||
result[i] = parameter;
|
||||
result[i] = new HandlerMethodParameter(i);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user