throw new IllegalStateException("Should never get here");
}
@SuppressWarnings("unchecked")
private ModelAndView getModelAndView(Method handlerMethod, Object returnValue, ServletWebRequest webRequest)
throws Exception {
<BUG>if (handlerMethod.isAnnotationPresent(ResponseStatus.class)) {
ResponseStatus responseStatus = handlerMethod.getAnnotation(ResponseStatus.class);
HttpServletResponse response = webRequest.getResponse();</BUG>
response.setStatus(responseStatus.value().value());
}

throw new IllegalStateException("Should never get here");
}
@SuppressWarnings("unchecked")
private ModelAndView getModelAndView(Method handlerMethod, Object returnValue, ServletWebRequest webRequest)
throws Exception {
ResponseStatus responseStatus = AnnotationUtils.findAnnotation(handlerMethod, ResponseStatus.class);
if (responseStatus != null) {
HttpServletResponse response = webRequest.getResponse();
response.setStatus(responseStatus.value().value());
}
