为什么在发生异常之后调用超类方法?如果发生异常,调用堆栈将返回给调用者而不是执行超类方法?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