Add nullcheck to passwordAgePredicate

Signed-off-by: twobiers <22715034+twobiers@users.noreply.github.com>
This commit is contained in:
Tobi 2025-01-08 13:18:45 +01:00 committed by Marek Posolda
parent d7d2a76676
commit 02691a8d76

View File

@ -147,7 +147,8 @@ public class PasswordCredentialProvider implements CredentialProvider<PasswordCr
}
private boolean passwordAgePredicate(CredentialModel credential, long passwordMaxAgeMillis) {
return credential.getCreatedDate() < passwordMaxAgeMillis;
long createdDate = credential.getCreatedDate() == null ? Long.MIN_VALUE : credential.getCreatedDate();
return createdDate < passwordMaxAgeMillis;
}
@Override