From 285b1b483ece98fb95311a8bcf6f1b292a44cb50 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Tue, 12 Jul 2022 11:00:39 +0200 Subject: [PATCH] Update Javadoc in DefaultHandlerExceptionResolver to reflect changes See gh-27052 --- .../DefaultHandlerExceptionResolver.java | 42 ++++++++++++------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java index be718122c3f..92823b35db6 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java @@ -257,7 +257,8 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param response current HTTP response * @param handler the executed handler, or {@code null} if none chosen * at the time of the exception (for example, if multipart resolution failed) - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled, or + * {@code null} indicating the exception should be handled in {@link #handleErrorResponse} * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} */ @Nullable @@ -277,7 +278,8 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param request current HTTP request * @param response current HTTP response * @param handler the executed handler - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled, or + * {@code null} indicating the exception should be handled in {@link #handleErrorResponse} * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} */ @Nullable @@ -297,7 +299,8 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param request current HTTP request * @param response current HTTP response * @param handler the executed handler - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled, or + * {@code null} indicating the exception should be handled in {@link #handleErrorResponse} * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} */ @Nullable @@ -315,7 +318,8 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param request current HTTP request * @param response current HTTP response * @param handler the executed handler - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled, or + * {@code null} indicating the exception should be handled in {@link #handleErrorResponse} * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} * @since 4.2 */ @@ -334,7 +338,8 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param request current HTTP request * @param response current HTTP response * @param handler the executed handler - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled, or + * {@code null} indicating the exception should be handled in {@link #handleErrorResponse} * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} */ @Nullable @@ -351,7 +356,8 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param request current HTTP request * @param response current HTTP response * @param handler the executed handler - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled, or + * {@code null} indicating the exception should be handled in {@link #handleErrorResponse} * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} */ @Nullable @@ -370,7 +376,8 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param request current HTTP request * @param response current HTTP response * @param handler the executed handler - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled, or + * {@code null} indicating the exception should be handled in {@link #handleErrorResponse} * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} */ @Nullable @@ -388,7 +395,8 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param request current HTTP request * @param response current HTTP response * @param handler the executed handler - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled, or + * {@code null} indicating the exception should be handled in {@link #handleErrorResponse} * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} */ @Nullable @@ -407,7 +415,8 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param response current HTTP response * @param handler the executed handler, or {@code null} if none chosen * at the time of the exception (for example, if multipart resolution failed) - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled, or + * {@code null} indicating the exception should be handled in {@link #handleErrorResponse} * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} * @since 4.0 */ @@ -428,7 +437,8 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param response current HTTP response * @param handler the executed handler, or {@code null} if none chosen * at the time of the exception (for example, if multipart resolution failed) - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled, or + * {@code null} indicating the exception should be handled in {@link #handleErrorResponse} * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} * @since 4.2.8 */ @@ -449,7 +459,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param request current HTTP request * @param response current HTTP response * @param handler the executed handler - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} * @since 6.0 */ @@ -485,7 +495,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param request current HTTP request * @param response current HTTP response * @param handler the executed handler - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} */ protected ModelAndView handleConversionNotSupported(ConversionNotSupportedException ex, @@ -503,7 +513,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param request current HTTP request * @param response current HTTP response * @param handler the executed handler - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} */ protected ModelAndView handleTypeMismatch(TypeMismatchException ex, @@ -523,7 +533,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param request current HTTP request * @param response current HTTP response * @param handler the executed handler - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} */ protected ModelAndView handleHttpMessageNotReadable(HttpMessageNotReadableException ex, @@ -544,7 +554,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param request current HTTP request * @param response current HTTP response * @param handler the executed handler - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} */ protected ModelAndView handleHttpMessageNotWritable(HttpMessageNotWritableException ex, @@ -562,7 +572,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * @param request current HTTP request * @param response current HTTP response * @param handler the executed handler - * @return an empty ModelAndView indicating the exception was handled + * @return an empty {@code ModelAndView} indicating the exception was handled * @throws IOException potentially thrown from {@link HttpServletResponse#sendError} */ protected ModelAndView handleBindException(BindException ex, HttpServletRequest request,