2
0
Эх сурвалжийг харах

Polish Format

Issue gh-13079
Josh Cummings 2 жил өмнө
parent
commit
599ed3e96b

+ 2 - 2
core/src/main/java/org/springframework/security/authorization/AuthorityAuthorizationManager.java

@@ -130,8 +130,8 @@ public final class AuthorityAuthorizationManager<T> implements AuthorizationMana
 		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;
 		}

+ 1 - 0
core/src/test/java/org/springframework/security/authorization/AuthorityAuthorizationManagerTests.java

@@ -271,4 +271,5 @@ public class AuthorityAuthorizationManagerTests {
 	void hasAnyRoleWhenEmptyRolePrefixThenNoException() {
 		AuthorityAuthorizationManager.hasAnyRole("", new String[] { "USER" });
 	}
+
 }