Skip to content

Commit 0795ae5

Browse files
committed
Polishing
1 parent 41ab177 commit 0795ae5

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExceptionResolver.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -46,8 +46,8 @@ public interface HandlerExceptionResolver {
4646
* @param handler the executed handler, or {@code null} if none chosen at the
4747
* time of the exception (for example, if multipart resolution failed)
4848
* @param ex the exception that got thrown during handler execution
49-
* @return a corresponding {@code ModelAndView} to forward to, or {@code null}
50-
* for default processing
49+
* @return a corresponding {@code ModelAndView} to forward to,
50+
* or {@code null} for default processing in the resolution chain
5151
*/
5252
@Nullable
5353
ModelAndView resolveException(

spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package org.springframework.web.servlet.handler;
1818

1919
import java.util.Set;
20-
2120
import javax.servlet.http.HttpServletRequest;
2221
import javax.servlet.http.HttpServletResponse;
2322

@@ -241,10 +240,11 @@ protected void preventCaching(HttpServletResponse response) {
241240
* @param handler the executed handler, or {@code null} if none chosen at the time
242241
* of the exception (for example, if multipart resolution failed)
243242
* @param ex the exception that got thrown during handler execution
244-
* @return a corresponding {@code ModelAndView} to forward to, or {@code null} for default processing
243+
* @return a corresponding {@code ModelAndView} to forward to,
244+
* or {@code null} for default processing in the resolution chain
245245
*/
246246
@Nullable
247-
protected abstract ModelAndView doResolveException(HttpServletRequest request,
248-
HttpServletResponse response, @Nullable Object handler, Exception ex);
247+
protected abstract ModelAndView doResolveException(
248+
HttpServletRequest request, HttpServletResponse response, @Nullable Object handler, Exception ex);
249249

250250
}

spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolver.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -176,12 +176,13 @@ public void setExceptionAttribute(@Nullable String exceptionAttribute) {
176176
* @param handler the executed handler, or {@code null} if none chosen at the time
177177
* of the exception (for example, if multipart resolution failed)
178178
* @param ex the exception that got thrown during handler execution
179-
* @return a corresponding ModelAndView to forward to, or {@code null} for default processing
179+
* @return a corresponding {@code ModelAndView} to forward to,
180+
* or {@code null} for default processing in the resolution chain
180181
*/
181182
@Override
182183
@Nullable
183-
protected ModelAndView doResolveException(HttpServletRequest request, HttpServletResponse response,
184-
@Nullable Object handler, Exception ex) {
184+
protected ModelAndView doResolveException(
185+
HttpServletRequest request, HttpServletResponse response, @Nullable Object handler, Exception ex) {
185186

186187
// Expose ModelAndView for chosen error view.
187188
String viewName = determineViewName(ex, request);

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolver.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -67,8 +67,8 @@ public void setMessageSource(MessageSource messageSource) {
6767

6868
@Override
6969
@Nullable
70-
protected ModelAndView doResolveException(HttpServletRequest request, HttpServletResponse response,
71-
@Nullable Object handler, Exception ex) {
70+
protected ModelAndView doResolveException(
71+
HttpServletRequest request, HttpServletResponse response, @Nullable Object handler, Exception ex) {
7272

7373
try {
7474
if (ex instanceof ResponseStatusException) {
@@ -86,7 +86,7 @@ protected ModelAndView doResolveException(HttpServletRequest request, HttpServle
8686
}
8787
}
8888
catch (Exception resolveEx) {
89-
logger.warn("Handling of @ResponseStatus resulted in Exception", resolveEx);
89+
logger.warn("ResponseStatus handling resulted in exception", resolveEx);
9090
}
9191
return null;
9292
}

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ public DefaultHandlerExceptionResolver() {
164164

165165
@Override
166166
@Nullable
167-
protected ModelAndView doResolveException(HttpServletRequest request, HttpServletResponse response,
168-
@Nullable Object handler, Exception ex) {
167+
protected ModelAndView doResolveException(
168+
HttpServletRequest request, HttpServletResponse response, @Nullable Object handler, Exception ex) {
169169

170170
try {
171171
if (ex instanceof HttpRequestMethodNotSupportedException) {
@@ -547,7 +547,6 @@ else if (logger.isDebugEnabled()) {
547547
return new ModelAndView();
548548
}
549549

550-
551550
/**
552551
* Invoked to send a server error. Sets the status to 500 and also sets the
553552
* request attribute "javax.servlet.error.exception" to the Exception.

0 commit comments

Comments
 (0)