Polishing (backported)

This commit is contained in:
Juergen Hoeller
2021-07-13 19:07:15 +02:00
parent 11c51d8633
commit fe3357d6b9
7 changed files with 22 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -185,7 +185,7 @@ class JettyHeadersAdapter implements MultiValueMap<String, String> {
private class EntryIterator implements Iterator<Entry<String, List<String>>> {
private Enumeration<String> names = headers.getFieldNames();
private final Enumeration<String> names = headers.getFieldNames();
@Override
public boolean hasNext() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -110,12 +110,13 @@ public class WebRequestDataBinder extends WebDataBinder {
public void bind(WebRequest request) {
MutablePropertyValues mpvs = new MutablePropertyValues(request.getParameterMap());
if (request instanceof NativeWebRequest) {
MultipartRequest multipartRequest = ((NativeWebRequest) request).getNativeRequest(MultipartRequest.class);
NativeWebRequest nativeRequest = (NativeWebRequest) request;
MultipartRequest multipartRequest = nativeRequest.getNativeRequest(MultipartRequest.class);
if (multipartRequest != null) {
bindMultipart(multipartRequest.getMultiFileMap(), mpvs);
}
else if (isMultipartRequest(request)) {
HttpServletRequest servletRequest = ((NativeWebRequest) request).getNativeRequest(HttpServletRequest.class);
HttpServletRequest servletRequest = nativeRequest.getNativeRequest(HttpServletRequest.class);
if (servletRequest != null) {
bindParts(servletRequest, mpvs);
}