Browse Source

Avoid NPE in error controller

pull/29/head
Dave Syer 13 years ago
parent
commit
10ddc90fb8
  1. 2
      spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/BasicErrorController.java

2
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/BasicErrorController.java

@ -84,7 +84,7 @@ public class BasicErrorController implements ErrorController { @@ -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());

Loading…
Cancel
Save