Minor polish in DispatcherServlet

See gh-23541
This commit is contained in:
Rossen Stoyanchev 2019-08-29 15:38:38 +03:00
parent 117119a88d
commit 48233317b8
2 changed files with 5 additions and 3 deletions

View File

@ -1131,6 +1131,7 @@ public class DispatcherServlet extends FrameworkServlet {
}
if (mappedHandler != null) {
// Exception (if any) is already handled..
mappedHandler.triggerAfterCompletion(request, response, null);
}
}
@ -1316,7 +1317,7 @@ public class DispatcherServlet extends FrameworkServlet {
if (logger.isTraceEnabled()) {
logger.trace("Using resolved error view: " + exMv, ex);
}
if (logger.isDebugEnabled()) {
else if (logger.isDebugEnabled()) {
logger.debug("Using resolved error view: " + exMv);
}
WebUtils.exposeErrorRequestAttributes(request, ex, getServletName());

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 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.
@ -141,7 +141,8 @@ public interface HandlerInterceptor {
* @param response current HTTP response
* @param handler handler (or {@link HandlerMethod}) that started asynchronous
* execution, for type and/or instance examination
* @param ex exception thrown on handler execution, if any
* @param ex any exception thrown on handler execution, if any; this does not
* include exceptions that have been handled through an exception resolver
* @throws Exception in case of errors
*/
default void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler,