Closed
Description
The jar is spring-cloud-netflix-core-1.2.2.RELEASE-sources.jar
In the code org\springframework\cloud\netflix\feign\annotation\RequestParamParameterProcessor.java, the method "processArgument" treat @RequestParam param as Map when the value is empty, but in spring mvc, when @RequestParam's value is null, reflect the field name as the value. This diffrent action can make misunderstand.
As follows:
@Override
public boolean processArgument(AnnotatedParameterContext context,
Annotation annotation) {
RequestParam requestParam = ANNOTATION.cast(annotation);
String name = requestParam.value();
if (emptyToNull(name) != null) {
context.setParameterName(name);
MethodMetadata data = context.getMethodMetadata();
Collection<String> query = context.setTemplateParameter(name,
data.template().queries().get(name));
data.template().query(name, query);
} else {
// supports `Map` types
MethodMetadata data = context.getMethodMetadata();
data.queryMapIndex(context.getParameterIndex());
}
return true;
}
Please fix it, :)
Metadata
Metadata
Assignees
Labels
No labels