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 be718122c3f9..92823b35db62 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 @@ else if (ex instanceof BindException) { * @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 @@ protected ModelAndView handleHttpRequestMethodNotSupported(HttpRequestMethodNotS * @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 @@ protected ModelAndView handleHttpMediaTypeNotSupported(HttpMediaTypeNotSupported * @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 @@ protected ModelAndView handleHttpMediaTypeNotAcceptable(HttpMediaTypeNotAcceptab * @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 @@ protected ModelAndView handleMissingPathVariable(MissingPathVariableException ex * @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 @@ protected ModelAndView handleMissingServletRequestParameter(MissingServletReques * @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 @@ protected ModelAndView handleMissingServletRequestPartException(MissingServletRe * @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 @@ protected ModelAndView handleServletRequestBindingException(ServletRequestBindin * @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 @@ protected ModelAndView handleMethodArgumentNotValidException(MethodArgumentNotVa * @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 @@ protected ModelAndView handleNoHandlerFoundException(NoHandlerFoundException ex, * @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 @@ protected ModelAndView handleAsyncRequestTimeoutException(AsyncRequestTimeoutExc * @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 @@ protected ModelAndView handleErrorResponse(ErrorResponse errorResponse, * @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 @@ protected ModelAndView handleConversionNotSupported(ConversionNotSupportedExcept * @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 @@ protected ModelAndView handleTypeMismatch(TypeMismatchException ex, * @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 @@ protected ModelAndView handleHttpMessageNotReadable(HttpMessageNotReadableExcept * @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 @@ protected ModelAndView handleHttpMessageNotWritable(HttpMessageNotWritableExcept * @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,