Skip to content

Commit

Permalink
Remove warn log if method parameter name does not match given paramet…
Browse files Browse the repository at this point in the history
…er name

It might well be that this differs, in
particular if Spring Converters are in place
  • Loading branch information
neiser committed May 28, 2021
1 parent ae009e6 commit dcf95b7
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,8 @@ public void customize(Parameter parameter, OperationParameterCustomizerContext c
context.getHandlerMethodParameter()
.flatMap(HandlerMethod.Parameter::getName)
.ifPresent(methodParameterName -> {
String parameterName = parameter.getName();
if (parameterName == null) {
if (parameter.getName() == null) {
parameter.setName(methodParameterName);
} else if (!parameterName.equals(methodParameterName)) {
LOGGER.warn("Parameter name {} different from parameter variable name {} in {}",
parameterName, methodParameterName, context.getOperationInfo());
}
});
if (StringUtils.isBlank(parameter.getName())) {
Expand Down

0 comments on commit dcf95b7

Please sign in to comment.