From cc87fbcb7fba7c4f630842d5f88692ae1228a7b3 Mon Sep 17 00:00:00 2001 From: Simon Bowring Date: Mon, 17 Sep 2018 11:07:48 +0100 Subject: [PATCH] Fix javadoc comments to match behaviour --- .../mvc/support/DefaultHandlerExceptionResolver.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 b9b6bd9ecf..b6fa2d823e 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 @@ -88,7 +88,7 @@ import org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver; * * *

MissingServletRequestParameterException

- *

500 (SC_INTERNAL_SERVER_ERROR)

+ *

400 (SC_BAD_REQUEST)

* * *

ServletRequestBindingException

@@ -364,7 +364,8 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes /** * Handle the case when a {@link org.springframework.web.bind.WebDataBinder} conversion cannot occur. *

The default implementation sends an HTTP 500 error, and returns an empty {@code ModelAndView}. - * Alternatively, a fallback view could be chosen, or the TypeMismatchException could be rethrown as-is. + * Alternatively, a fallback view could be chosen, or the ConversionNotSupportedException could be + * rethrown as-is. * @param ex the ConversionNotSupportedException to be handled * @param request current HTTP request * @param response current HTTP response @@ -401,7 +402,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * Handle the case where a {@linkplain org.springframework.http.converter.HttpMessageConverter message converter} * cannot read from a HTTP request. *

The default implementation sends an HTTP 400 error, and returns an empty {@code ModelAndView}. - * Alternatively, a fallback view could be chosen, or the HttpMediaTypeNotSupportedException could be + * Alternatively, a fallback view could be chosen, or the HttpMessageNotReadableException could be * rethrown as-is. * @param ex the HttpMessageNotReadableException to be handled * @param request current HTTP request @@ -422,7 +423,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes * {@linkplain org.springframework.http.converter.HttpMessageConverter message converter} * cannot write to a HTTP request. *

The default implementation sends an HTTP 500 error, and returns an empty {@code ModelAndView}. - * Alternatively, a fallback view could be chosen, or the HttpMediaTypeNotSupportedException could + * Alternatively, a fallback view could be chosen, or the HttpMessageNotWritableException could * be rethrown as-is. * @param ex the HttpMessageNotWritableException to be handled * @param request current HTTP request