From 19ae3a765d19ef01c8af7378c888e5ee78796d19 Mon Sep 17 00:00:00 2001 From: Mario Petrovski Date: Fri, 1 Sep 2023 14:32:33 +0200 Subject: [PATCH] Make class final --- .../oauth2/core/ScopeAuthorizationManagerFactory.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/ScopeAuthorizationManagerFactory.java b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/ScopeAuthorizationManagerFactory.java index 0f1c0c9829..1d6ae4143f 100644 --- a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/ScopeAuthorizationManagerFactory.java +++ b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/ScopeAuthorizationManagerFactory.java @@ -23,7 +23,7 @@ import org.springframework.security.authorization.AuthorityAuthorizationManager; /** * @author Mario Petrovski */ -public class ScopeAuthorizationManagerFactory { +public final class ScopeAuthorizationManagerFactory { private ScopeAuthorizationManagerFactory() { } @@ -33,9 +33,7 @@ public class ScopeAuthorizationManagerFactory { } public static AuthorityAuthorizationManager hasAnyScope(String... scopes) { - String[] mappedScopes = Arrays.stream(scopes).map(s -> { - return "SCOPE_" + s; - }).toArray(String[]::new); + String[] mappedScopes = Arrays.stream(scopes).map(s -> "SCOPE_" + s).toArray(String[]::new); return AuthorityAuthorizationManager.hasAnyAuthority(mappedScopes); } }