Polishing
This commit is contained in:
@@ -266,8 +266,8 @@ public class FormHttpMessageConverter implements HttpMessageConverter<MultiValue
|
||||
if (contentType != null) {
|
||||
return MediaType.MULTIPART_FORM_DATA.includes(contentType);
|
||||
}
|
||||
for (String name : map.keySet()) {
|
||||
for (Object value : map.get(name)) {
|
||||
for (List<?> values : map.values()) {
|
||||
for (Object value : values) {
|
||||
if (value != null && !(value instanceof String)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2019 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.
|
||||
@@ -54,7 +54,7 @@ public class DeferredResult<T> {
|
||||
private static final Log logger = LogFactory.getLog(DeferredResult.class);
|
||||
|
||||
|
||||
private final Long timeout;
|
||||
private final Long timeoutValue;
|
||||
|
||||
private final Object timeoutResult;
|
||||
|
||||
@@ -77,25 +77,25 @@ public class DeferredResult<T> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a DeferredResult with a timeout value.
|
||||
* Create a DeferredResult with a custom timeout value.
|
||||
* <p>By default not set in which case the default configured in the MVC
|
||||
* Java Config or the MVC namespace is used, or if that's not set, then the
|
||||
* timeout depends on the default of the underlying server.
|
||||
* @param timeout timeout value in milliseconds
|
||||
* @param timeoutValue timeout value in milliseconds
|
||||
*/
|
||||
public DeferredResult(Long timeout) {
|
||||
this(timeout, RESULT_NONE);
|
||||
public DeferredResult(Long timeoutValue) {
|
||||
this(timeoutValue, RESULT_NONE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a DeferredResult with a timeout value and a default result to use
|
||||
* in case of timeout.
|
||||
* @param timeout timeout value in milliseconds (ignored if {@code null})
|
||||
* @param timeoutValue timeout value in milliseconds (ignored if {@code null})
|
||||
* @param timeoutResult the result to use
|
||||
*/
|
||||
public DeferredResult(Long timeout, Object timeoutResult) {
|
||||
public DeferredResult(Long timeoutValue, Object timeoutResult) {
|
||||
this.timeoutValue = timeoutValue;
|
||||
this.timeoutResult = timeoutResult;
|
||||
this.timeout = timeout;
|
||||
}
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ public class DeferredResult<T> {
|
||||
* Return the configured timeout value in milliseconds.
|
||||
*/
|
||||
final Long getTimeoutValue() {
|
||||
return this.timeout;
|
||||
return this.timeoutValue;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user