Use instanceof Pattern Matching
This commit is contained in:
parent
6ec81b1aec
commit
742c95b1fc
|
@ -112,8 +112,8 @@ public abstract class AbstractAuthenticationToken implements Authentication, Cre
|
||||||
}
|
}
|
||||||
|
|
||||||
private void eraseSecret(Object secret) {
|
private void eraseSecret(Object secret) {
|
||||||
if (secret instanceof CredentialsContainer) {
|
if (secret instanceof CredentialsContainer container) {
|
||||||
((CredentialsContainer) secret).eraseCredentials();
|
container.eraseCredentials();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue