mirror of
https://github.com/spring-projects/spring-security.git
synced 2026-01-17 03:46:56 +00:00
Add nullability contract to PasswordEncoder#encode
Signed-off-by: Stefano Cordio <stefano.cordio@gmail.com>
This commit is contained in:
parent
fe138d6434
commit
a612522ecd
@ -17,6 +17,7 @@
|
||||
package org.springframework.security.crypto.password;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
import org.springframework.lang.Contract;
|
||||
|
||||
/**
|
||||
* Service interface for encoding passwords.
|
||||
@ -36,6 +37,7 @@ public interface PasswordEncoder {
|
||||
* @return A non-null encoded password, unless the rawPassword was null in which case
|
||||
* the result must be null.
|
||||
*/
|
||||
@Contract("null -> null; !null -> !null")
|
||||
@Nullable String encode(@Nullable CharSequence rawPassword);
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user