From fae27df1f3644393c23d7f60321b7e35c4b57404 Mon Sep 17 00:00:00 2001 From: whitemark Date: Wed, 26 Jun 2024 22:19:50 +0900 Subject: [PATCH] [feature/#323] spotlessJavaApply --- .../domain/board/usecase/BoardSecurityChecker.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/resource-server/src/main/java/com/inhabas/api/domain/board/usecase/BoardSecurityChecker.java b/resource-server/src/main/java/com/inhabas/api/domain/board/usecase/BoardSecurityChecker.java index 352eac63..31ae7a51 100644 --- a/resource-server/src/main/java/com/inhabas/api/domain/board/usecase/BoardSecurityChecker.java +++ b/resource-server/src/main/java/com/inhabas/api/domain/board/usecase/BoardSecurityChecker.java @@ -6,9 +6,9 @@ import java.util.Collection; import java.util.Collections; import java.util.List; - import java.util.Set; import java.util.stream.Collectors; + import javax.persistence.EntityNotFoundException; import lombok.RequiredArgsConstructor; @@ -102,13 +102,11 @@ public boolean checkMenuAccess(Integer menuId, String action) { break; } - Set prefixedRoles = requiredRoles.stream() - .map(role -> ROLE_PREFIX + role) - .collect(Collectors.toSet()); + Set prefixedRoles = + requiredRoles.stream().map(role -> ROLE_PREFIX + role).collect(Collectors.toSet()); - boolean hasAuthority = authorities.stream() - .map(GrantedAuthority::getAuthority) - .anyMatch(prefixedRoles::contains); + boolean hasAuthority = + authorities.stream().map(GrantedAuthority::getAuthority).anyMatch(prefixedRoles::contains); if (!hasAuthority) { throw new InvalidAuthorityException();