We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
PasswordEncoder#encode
1 parent 5a7d93e commit d526a24Copy full SHA for d526a24
1 file changed
crypto/src/main/java/org/springframework/security/crypto/password/PasswordEncoder.java
@@ -17,6 +17,7 @@
17
package org.springframework.security.crypto.password;
18
19
import org.jspecify.annotations.Nullable;
20
+import org.springframework.lang.Contract;
21
22
/**
23
* Service interface for encoding passwords.
@@ -36,6 +37,7 @@ public interface PasswordEncoder {
36
37
* @return A non-null encoded password, unless the rawPassword was null in which case
38
* the result must be null.
39
*/
40
+ @Contract("null -> null; !null -> !null")
41
@Nullable String encode(@Nullable CharSequence rawPassword);
42
43
0 commit comments