Remove dead code in DefaultErrorAttributes

See gh-27538
pull/28061/head
wuwen 3 years ago committed by Stephane Nicoll
parent 5d793afcb5
commit 46c47dcd29

@ -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