|
@@ -118,9 +118,14 @@ public final class JwtGrantedAuthoritiesConverter implements Converter<Jwt, Coll
|
|
return Collections.emptyList();
|
|
return Collections.emptyList();
|
|
}
|
|
}
|
|
if (authorities instanceof Collection) {
|
|
if (authorities instanceof Collection) {
|
|
- return (Collection<String>) authorities;
|
|
|
|
|
|
+ return castAuthoritiesToCollection(authorities);
|
|
}
|
|
}
|
|
return Collections.emptyList();
|
|
return Collections.emptyList();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
|
+ private Collection<String> castAuthoritiesToCollection(Object authorities) {
|
|
|
|
+ return (Collection<String>) authorities;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|