爲什麼在發生異常之後調用超類方法?如果發生異常,調用堆棧將返回給調用者而不是執行超類方法?Spring Security UsernamePasswordAuthenticationToken在調用超類方法之前拋出異常
public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException {
if (isAuthenticated) {
throw new IllegalArgumentException(
"Cannot set this token to trusted - use constructor which takes a GrantedAuthority list instead");
}
super.setAuthenticated(false);
}
爲什麼會出現向下投票呢? – youcanlearnanything