Apply consistent RuntimeHints defaults
This commit harmonizes the registration of an executable so that the default method and the method that takes an empty customizer produces the same hint. The same applies to the readable flag of a field hint. Rather than returning a list of executable modes, the "highest" mode is retained. See gh-29011
This commit is contained in:
@@ -63,13 +63,13 @@ class RequestMappingReflectiveProcessor implements ReflectiveProcessor {
|
||||
}
|
||||
|
||||
protected void registerMethodHints(ReflectionHints hints, Method method) {
|
||||
hints.registerMethod(method, hint -> hint.setModes(ExecutableMode.INVOKE));
|
||||
hints.registerMethod(method, hint -> hint.withMode(ExecutableMode.INVOKE));
|
||||
registerParameterHints(hints, method);
|
||||
registerReturnValueHints(hints, method);
|
||||
}
|
||||
|
||||
protected void registerParameterHints(ReflectionHints hints, Method method) {
|
||||
hints.registerMethod(method, hint -> hint.setModes(ExecutableMode.INVOKE));
|
||||
hints.registerMethod(method, hint -> hint.withMode(ExecutableMode.INVOKE));
|
||||
for (Parameter parameter : method.getParameters()) {
|
||||
MethodParameter methodParameter = MethodParameter.forParameter(parameter);
|
||||
if (methodParameter.hasParameterAnnotation(RequestBody.class) ||
|
||||
|
||||
Reference in New Issue
Block a user