refactor(WechatAuthenticationToken.java):

优化布尔值判断
This commit is contained in:
代家彪 2022-02-21 11:07:24 +08:00
parent 7b8c776b06
commit 4935465a69

View File

@ -54,7 +54,7 @@ public class WechatAuthenticationToken extends AbstractAuthenticationToken {
}
public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException {
Assert.isTrue(isAuthenticated == false, "Cannot set this token to trusted - use constructor which takes a GrantedAuthority list instead");
Assert.isTrue(!isAuthenticated, "Cannot set this token to trusted - use constructor which takes a GrantedAuthority list instead");
super.setAuthenticated(false);
}