1 package org.springframework.security.oauth2.common;
2
3 import org.springframework.security.web.util.ThrowableAnalyzer;
4 import org.springframework.security.web.util.ThrowableCauseExtractor;
5
6 import javax.servlet.ServletException;
7
8
9
10
11
12 public final class DefaultThrowableAnalyzer extends ThrowableAnalyzer {
13
14
15
16 protected void initExtractorMap() {
17 super.initExtractorMap();
18
19 registerExtractor(ServletException.class, new ThrowableCauseExtractor() {
20 public Throwable extractCause(Throwable throwable) {
21 ThrowableAnalyzer.verifyThrowableHierarchy(throwable, ServletException.class);
22 return ((ServletException) throwable).getRootCause();
23 }
24 });
25 }
26 }