移除多余的if判断

This commit is contained in:
林常坤 2023-03-28 17:54:05 +08:00
parent 907eec1801
commit 48448fcbb2

View File

@ -28,10 +28,8 @@ public class OAuth2EndpointUtils {
Map<String, String[]> parameterMap = request.getParameterMap(); Map<String, String[]> parameterMap = request.getParameterMap();
MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>(parameterMap.size()); MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>(parameterMap.size());
parameterMap.forEach((key, values) -> { parameterMap.forEach((key, values) -> {
if (values.length > 0) { for (String value : values) {
for (String value : values) { parameters.add(key, value);
parameters.add(key, value);
}
} }
}); });
return parameters; return parameters;