Browse Source

Merge branch '5.1.x'

pull/23119/head
Juergen Hoeller 6 years ago
parent
commit
bd76a160bb
  1. 2
      spring-web/src/main/java/org/springframework/web/accept/MappingMediaTypeFileExtensionResolver.java
  2. 9
      spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncManager.java

2
spring-web/src/main/java/org/springframework/web/accept/MappingMediaTypeFileExtensionResolver.java

@ -57,7 +57,7 @@ public class MappingMediaTypeFileExtensionResolver implements MediaTypeFileExten @@ -57,7 +57,7 @@ public class MappingMediaTypeFileExtensionResolver implements MediaTypeFileExten
mediaTypes.forEach((extension, mediaType) -> {
String lowerCaseExtension = extension.toLowerCase(Locale.ENGLISH);
this.mediaTypes.put(lowerCaseExtension, mediaType);
addFileExtension(mediaType, extension);
addFileExtension(mediaType, lowerCaseExtension);
allFileExtensions.add(lowerCaseExtension);
});
this.allFileExtensions.addAll(allFileExtensions);

9
spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncManager.java

@ -296,7 +296,9 @@ public final class WebAsyncManager { @@ -296,7 +296,9 @@ public final class WebAsyncManager {
final CallableInterceptorChain interceptorChain = new CallableInterceptorChain(interceptors);
this.asyncWebRequest.addTimeoutHandler(() -> {
logger.debug("Async request timeout for " + formatRequestUri());
if (logger.isDebugEnabled()) {
logger.debug("Async request timeout for " + formatRequestUri());
}
Object result = interceptorChain.triggerAfterTimeout(this.asyncWebRequest, callable);
if (result != CallableProcessingInterceptor.RESULT_NONE) {
setConcurrentResultAndDispatch(result);
@ -304,7 +306,9 @@ public final class WebAsyncManager { @@ -304,7 +306,9 @@ public final class WebAsyncManager {
});
this.asyncWebRequest.addErrorHandler(ex -> {
logger.debug("Async request error for " + formatRequestUri() + ": " + ex);
if (logger.isDebugEnabled()) {
logger.debug("Async request error for " + formatRequestUri() + ": " + ex);
}
Object result = interceptorChain.triggerAfterError(this.asyncWebRequest, callable, ex);
result = (result != CallableProcessingInterceptor.RESULT_NONE ? result : ex);
setConcurrentResultAndDispatch(result);
@ -339,7 +343,6 @@ public final class WebAsyncManager { @@ -339,7 +343,6 @@ public final class WebAsyncManager {
}
}
@SuppressWarnings("ConstantConditions")
private void logExecutorWarning() {
if (taskExecutorWarning && logger.isWarnEnabled()) {
synchronized (DEFAULT_TASK_EXECUTOR) {

Loading…
Cancel
Save