mirror of
https://github.com/spring-projects/spring-security.git
synced 2026-02-25 06:34:59 +00:00
Remove unused @Nullable
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
This commit is contained in:
parent
f27738c1f8
commit
dbf7f4cfe5
@ -88,7 +88,6 @@ public final class FactorGrantedAuthority implements GrantedAuthority {
|
||||
|
||||
private final Instant issuedAt;
|
||||
|
||||
@SuppressWarnings("NullAway")
|
||||
private FactorGrantedAuthority(String authority, Instant issuedAt) {
|
||||
Assert.notNull(authority, "authority cannot be null");
|
||||
Assert.notNull(issuedAt, "issuedAt cannot be null");
|
||||
|
||||
@ -303,6 +303,7 @@ public class SwitchUserFilter extends GenericFilterBean implements ApplicationEv
|
||||
// grant an additional authority that contains the original Authentication object
|
||||
// which will be used to 'exit' from the current switched user.
|
||||
Authentication currentAuthentication = getCurrentAuthentication(request);
|
||||
Assert.notNull(currentAuthentication, "currentAuthentication cannot be null");
|
||||
GrantedAuthority switchAuthority = new SwitchUserGrantedAuthority(this.switchAuthorityRole,
|
||||
currentAuthentication);
|
||||
// get the original authorities
|
||||
|
||||
@ -16,8 +16,6 @@
|
||||
|
||||
package org.springframework.security.web.authentication.switchuser;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.util.Assert;
|
||||
@ -40,7 +38,7 @@ public final class SwitchUserGrantedAuthority implements GrantedAuthority {
|
||||
|
||||
private final Authentication source;
|
||||
|
||||
public SwitchUserGrantedAuthority(String role, @Nullable Authentication source) {
|
||||
public SwitchUserGrantedAuthority(String role, Authentication source) {
|
||||
Assert.notNull(role, "role cannot be null");
|
||||
Assert.notNull(source, "source cannot be null");
|
||||
this.role = role;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user