Avoid NPE in error controller

This commit is contained in:
Dave Syer
2013-08-18 18:05:46 +01:00
parent cdaf0c0960
commit 10ddc90fb8
@@ -84,7 +84,7 @@ public class BasicErrorController implements ErrorController {
}
map.put("status", status);
if (error != null) {
while (error instanceof ServletException) {
while (error instanceof ServletException && error.getCause() != null) {
error = ((ServletException) error).getCause();
}
map.put("exception", error.getClass().getName());