Merge pull request #27538 from wuwen5

* pr/27538:
  Remove dead code in DefaultErrorAttributes

Closes gh-27538
pull/28061/head
Stephane Nicoll 3 years ago
commit b85f0ee33d

@ -36,7 +36,6 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.validation.BindingResult;
import org.springframework.validation.ObjectError;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.WebRequest;
import org.springframework.web.servlet.HandlerExceptionResolver;
@ -219,9 +218,6 @@ public class DefaultErrorAttributes implements ErrorAttributes, HandlerException
if (error instanceof BindingResult) {
return (BindingResult) error;
}
if (error instanceof MethodArgumentNotValidException) {
return ((MethodArgumentNotValidException) error).getBindingResult();
}
return null;
}

Loading…
Cancel
Save