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:
+2
-2
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user