1
0
mirror of synced 2026-05-22 13:23:17 +00:00

Polish JavaDoc

1. Removed comment about not changing field name in a
serialized object as this is true for all fields in a
Java-serialize POJO
2. Added example value for the constructor that demonstrates
the relationship between a role and an authority

Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
This commit is contained in:
Josh Cummings
2025-10-20 14:21:40 -06:00
parent b55c28cf25
commit eb43830260
@@ -33,12 +33,12 @@ public final class SimpleGrantedAuthority implements GrantedAuthority {
private static final long serialVersionUID = 620L;
// CAUTION renaming to authority will break serialization compatibility
private final String role;
/**
* Constructs a {@code SimpleGrantedAuthority} using the provided authority.
* @param authority The provided authority such as prefixed role
* @param authority The provided authority, including any prefix; for example,
* {@code ROLE_ADMIN}
*/
public SimpleGrantedAuthority(String authority) {
Assert.hasText(authority, "A granted authority textual representation is required");