Skip to content

Commit 695dd0f

Browse files
committed
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 <[email protected]>
1 parent c0b8c18 commit 695dd0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/java/org/springframework/security/core/authority/SimpleGrantedAuthority.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ public final class SimpleGrantedAuthority implements GrantedAuthority {
3333

3434
private static final long serialVersionUID = 620L;
3535

36-
// CAUTION renaming to authority will break serialization compatibility
3736
private final String role;
3837

3938
/**
4039
* Constructs a {@code SimpleGrantedAuthority} using the provided authority.
41-
* @param authority The provided authority such as prefixed role
40+
* @param authority The provided authority, including any prefix; for example,
41+
* {@code ROLE_ADMIN}
4242
*/
4343
public SimpleGrantedAuthority(String authority) {
4444
Assert.hasText(authority, "A granted authority textual representation is required");

0 commit comments

Comments
 (0)