Skip to content

Commit

Permalink
Polish Format
Browse files Browse the repository at this point in the history
Issue gh-13079
  • Loading branch information
jzheaux committed Apr 24, 2023
1 parent 73a543d commit 599ed3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ private static String[] toNamedRolesArray(String rolePrefix, String[] roles) {
String[] result = new String[roles.length];
for (int i = 0; i < roles.length; i++) {
String role = roles[i];
Assert.isTrue(rolePrefix.isEmpty() || !role.startsWith(rolePrefix), () -> role + " should not start with " + rolePrefix + " since "
+ rolePrefix
Assert.isTrue(rolePrefix.isEmpty() || !role.startsWith(rolePrefix), () -> role + " should not start with "
+ rolePrefix + " since " + rolePrefix
+ " is automatically prepended when using hasAnyRole. Consider using hasAnyAuthority instead.");
result[i] = rolePrefix + role;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,4 +271,5 @@ public void hasRoleWhenRoleHierarchySetThenGreaterRoleTakesPrecedence() {
void hasAnyRoleWhenEmptyRolePrefixThenNoException() {
AuthorityAuthorizationManager.hasAnyRole("", new String[] { "USER" });
}

}

0 comments on commit 599ed3e

Please sign in to comment.