Skip to content

Commit 05e75bf

Browse files
author
wreulicke
committed
fix deprecation
1 parent f9ad9dd commit 05e75bf

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

spar-wings-monolith/src/main/java/jp/xet/sparwings/spring/web/error/handler/DefaultRestErrorResolver.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import org.springframework.web.bind.MissingServletRequestParameterException;
3838
import org.springframework.web.context.request.ServletWebRequest;
3939
import org.springframework.web.servlet.LocaleResolver;
40-
import org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMethodException;
4140

4241
/**
4342
* Default {@code RestErrorResolver} implementation that converts discovered Exceptions to
@@ -104,7 +103,6 @@ protected final Map<String, String> createDefaultExceptionMappingDefinitions() {
104103
applyDef(m, "javax.validation.ValidationException", HttpStatus.BAD_REQUEST);
105104

106105
// 404
107-
applyDef(m, NoSuchRequestHandlingMethodException.class, HttpStatus.NOT_FOUND);
108106
applyDef(m, "org.hibernate.ObjectNotFoundException", HttpStatus.NOT_FOUND);
109107

110108
// 405
@@ -230,9 +228,9 @@ protected String getMessage(String msg, ServletWebRequest webRequest, Exception
230228
/**
231229
* Returns the config-time 'template' RestError instance configured for the specified Exception, or
232230
* {@code null} if a match was not found.
233-
*
231+
*
234232
* <p>The config-time template is used as the basis for the RestError constructed at runtime.</p>
235-
*
233+
*
236234
* @param ex
237235
* @return the template to use for the RestError instance to be constructed.
238236
*/
@@ -263,10 +261,10 @@ private RestError getRestErrorTemplate(Exception ex) {
263261

264262
/**
265263
* Return the depth to the superclass matching.
266-
*
264+
*
267265
* <p>0 means ex matches exactly. Returns -1 if there's no match.
268266
* Otherwise, returns depth. Lowest depth wins.</p>
269-
*
267+
*
270268
* @param exceptionMapping
271269
* @param ex
272270
* @return

0 commit comments

Comments
 (0)