Skip to content

Commit 400e0c8

Browse files
larsgreferrwinch
authored andcommitted
Add missing nullability annotation
1 parent 39ba100 commit 400e0c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web/src/main/java/org/springframework/security/web/authentication/UsernamePasswordAuthenticationFilter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package org.springframework.security.web.authentication;
1818

19+
import org.springframework.lang.Nullable;
1920
import org.springframework.security.authentication.AuthenticationServiceException;
2021
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
2122
import org.springframework.security.core.Authentication;
@@ -109,6 +110,7 @@ public Authentication attemptAuthentication(HttpServletRequest request,
109110
* @return the password that will be presented in the <code>Authentication</code>
110111
* request token to the <code>AuthenticationManager</code>
111112
*/
113+
@Nullable
112114
protected String obtainPassword(HttpServletRequest request) {
113115
return request.getParameter(passwordParameter);
114116
}
@@ -122,6 +124,7 @@ protected String obtainPassword(HttpServletRequest request) {
122124
* @return the username that will be presented in the <code>Authentication</code>
123125
* request token to the <code>AuthenticationManager</code>
124126
*/
127+
@Nullable
125128
protected String obtainUsername(HttpServletRequest request) {
126129
return request.getParameter(usernameParameter);
127130
}

0 commit comments

Comments
 (0)