提交 4c334de8 编写于 作者: J Juergen Hoeller

Use Map.values() iteration within isMultipart check

Closes gh-22982
上级 da4430e2
...@@ -202,8 +202,8 @@ public class MultipartHttpMessageWriter extends LoggingCodecSupport ...@@ -202,8 +202,8 @@ public class MultipartHttpMessageWriter extends LoggingCodecSupport
if (contentType != null) { if (contentType != null) {
return MediaType.MULTIPART_FORM_DATA.includes(contentType); return MediaType.MULTIPART_FORM_DATA.includes(contentType);
} }
for (String name : map.keySet()) { for (List<?> values : map.values()) {
for (Object value : map.get(name)) { for (Object value : values) {
if (value != null && !(value instanceof String)) { if (value != null && !(value instanceof String)) {
return true; return true;
} }
......
...@@ -283,8 +283,8 @@ public class FormHttpMessageConverter implements HttpMessageConverter<MultiValue ...@@ -283,8 +283,8 @@ public class FormHttpMessageConverter implements HttpMessageConverter<MultiValue
if (contentType != null) { if (contentType != null) {
return MediaType.MULTIPART_FORM_DATA.includes(contentType); return MediaType.MULTIPART_FORM_DATA.includes(contentType);
} }
for (String name : map.keySet()) { for (List<?> values : map.values()) {
for (Object value : map.get(name)) { for (Object value : values) {
if (value != null && !(value instanceof String)) { if (value != null && !(value instanceof String)) {
return true; return true;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册