Mark GrantedAuthority#getAuthority as @Nullable
Closes: gh-17999 Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
This commit is contained in:
committed by
Josh Cummings
parent
eb43830260
commit
9b61533db2
+2
-1
@@ -281,7 +281,8 @@ public final class SecurityMockMvcResultMatchers {
|
||||
for (String role : roles) {
|
||||
withPrefix.add(new SimpleGrantedAuthority(rolePrefix + role));
|
||||
}
|
||||
this.ignoreAuthorities = (authority) -> !authority.getAuthority().startsWith(rolePrefix);
|
||||
this.ignoreAuthorities = (authority) -> (authority.getAuthority() != null
|
||||
&& !authority.getAuthority().startsWith(rolePrefix));
|
||||
return withAuthorities(withPrefix);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user