Polishing

(cherry picked from commit ffa032e78f)
This commit is contained in:
Juergen Hoeller
2018-10-24 20:46:26 +02:00
parent c9f1016581
commit d5f725d503
12 changed files with 72 additions and 93 deletions

View File

@@ -81,12 +81,13 @@ public class ResponseStatusExceptionResolver extends AbstractHandlerExceptionRes
}
if (ex.getCause() instanceof Exception) {
ex = (Exception) ex.getCause();
return doResolveException(request, response, handler, ex);
return doResolveException(request, response, handler, (Exception) ex.getCause());
}
}
catch (Exception resolveEx) {
logger.warn("ResponseStatus handling resulted in exception", resolveEx);
if (logger.isWarnEnabled()) {
logger.warn("Failure while trying to resolve exception [" + ex.getClass().getName() + "]", resolveEx);
}
}
return null;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -43,7 +43,7 @@ import org.springframework.web.multipart.support.RequestPartServletServerHttpReq
/**
* Resolves the following method arguments:
* <ul>
* <li>Annotated with {@code @RequestPart}
* <li>Annotated with @{@link RequestPart}
* <li>Of type {@link MultipartFile} in conjunction with Spring's {@link MultipartResolver} abstraction
* <li>Of type {@code javax.servlet.http.Part} in conjunction with Servlet 3.0 multipart requests
* </ul>
@@ -87,11 +87,13 @@ public class RequestPartMethodArgumentResolver extends AbstractMessageConverterM
/**
* Supports the following:
* Whether the given {@linkplain MethodParameter method parameter} is a multi-part
* supported. Supports the following:
* <ul>
* <li>annotated with {@code @RequestPart}
* <li>of type {@link MultipartFile} unless annotated with {@code @RequestParam}
* <li>of type {@code javax.servlet.http.Part} unless annotated with {@code @RequestParam}
* <li>of type {@code javax.servlet.http.Part} unless annotated with
* {@code @RequestParam}
* </ul>
*/
@Override