Add @Nullable to Delegating*Converter.convert()

Issue gh-88, gh-45
This commit is contained in:
Joe Grandja 2020-10-09 15:38:49 -04:00
parent aa5133e170
commit f0013fc062
2 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,7 @@
*/
package org.springframework.security.oauth2.server.authorization.web;
import org.springframework.lang.Nullable;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.AuthenticationConverter;
import org.springframework.util.Assert;
@ -50,6 +51,7 @@ public final class DelegatingAuthenticationConverter implements AuthenticationCo
this.converters = Collections.unmodifiableList(new LinkedList<>(converters));
}
@Nullable
@Override
public Authentication convert(HttpServletRequest request) {
Assert.notNull(request, "request cannot be null");

View File

@ -16,6 +16,7 @@
package org.springframework.security.oauth2.server.authorization.web;
import org.springframework.core.convert.converter.Converter;
import org.springframework.lang.Nullable;
import org.springframework.security.core.Authentication;
import org.springframework.security.oauth2.core.AuthorizationGrantType;
import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames;
@ -48,6 +49,7 @@ public final class DelegatingAuthorizationGrantAuthenticationConverter implement
this.converters = Collections.unmodifiableMap(new HashMap<>(converters));
}
@Nullable
@Override
public Authentication convert(HttpServletRequest request) {
Assert.notNull(request, "request cannot be null");