1
0
mirror of synced 2026-09-11 03:39:49 +00:00

Skip Null List Elements When Mapping CAS Attributes To Authorities

The io.spring.nullability plugin 0.0.16 upgrade tightens NullAway
analysis and flags list elements from the unannotated, raw
List<?> attribute value as possibly null. A null element has no
value to contribute to an authority, consistent with how a null
attribute value as a whole is already skipped.

See gh-19670

Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
This commit is contained in:
Josh Cummings
2026-09-08 12:35:18 -06:00
parent 864c082a38
commit 25c71e28a8
@@ -61,7 +61,9 @@ public final class GrantedAuthorityFromAssertionAttributesUserDetailsService
if (value != null) {
if (value instanceof List) {
for (Object o : (List<?>) value) {
grantedAuthorities.add(createSimpleGrantedAuthority(o));
if (o != null) {
grantedAuthorities.add(createSimpleGrantedAuthority(o));
}
}
}
else {