1
0
mirror of synced 2026-08-05 01:36:56 +00:00

Simplify condition in some methods

This commit is contained in:
Tran Ngoc Nhan
2024-10-25 19:41:26 +07:00
committed by Josh Cummings
parent e76de931ce
commit ab93541926
7 changed files with 15 additions and 39 deletions
@@ -115,15 +115,8 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken implemen
if (!super.equals(obj)) {
return false;
}
if (obj instanceof CasAuthenticationToken) {
CasAuthenticationToken test = (CasAuthenticationToken) obj;
if (!this.assertion.equals(test.getAssertion())) {
return false;
}
if (this.getKeyHash() != test.getKeyHash()) {
return false;
}
return true;
if (obj instanceof CasAuthenticationToken test) {
return this.assertion.equals(test.getAssertion()) && this.getKeyHash() == test.getKeyHash();
}
return false;
}