Return consistent collection type for matrix variables
See gh-31483
This commit is contained in:
committed by
Stéphane Nicoll
parent
6bdf7ad36a
commit
ea30c8fb5b
@@ -69,7 +69,7 @@ public class MatrixVariableMapMethodArgumentResolver implements HandlerMethodArg
|
||||
HandlerMapping.MATRIX_VARIABLES_ATTRIBUTE, RequestAttributes.SCOPE_REQUEST);
|
||||
|
||||
if (CollectionUtils.isEmpty(matrixVariables)) {
|
||||
return Collections.emptyMap();
|
||||
return (isSingleValueMap(parameter) ? Collections.emptyMap() : new LinkedMultiValueMap<>(0));
|
||||
}
|
||||
|
||||
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
|
||||
|
||||
Reference in New Issue
Block a user