mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-07 19:22:14 +00:00
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…
x
Reference in New Issue
Block a user