From df2d9f1f15c876fefec66e5b2090af34bfd5e823 Mon Sep 17 00:00:00 2001 From: chyun Date: Sat, 18 Jan 2025 04:05:08 +0900 Subject: [PATCH] =?UTF-8?q?style=20[#81]=20=EC=A3=BC=EC=84=9D=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../confeti/global/util/artistsearcher/ArtistResolver.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/sopt/confeti/global/util/artistsearcher/ArtistResolver.java b/src/main/java/org/sopt/confeti/global/util/artistsearcher/ArtistResolver.java index 728bc43..f92149c 100644 --- a/src/main/java/org/sopt/confeti/global/util/artistsearcher/ArtistResolver.java +++ b/src/main/java/org/sopt/confeti/global/util/artistsearcher/ArtistResolver.java @@ -17,6 +17,7 @@ @RequiredArgsConstructor(access = AccessLevel.PROTECTED) public class ArtistResolver { + // 기존에 조회할 클래스를 매핑 private final ConcurrentHashMap, IntegrateFunction> collectByTypeMapper = new ConcurrentHashMap, IntegrateFunction>() {{ put(ArtistFavorite.class, args -> { collectArtistFavorite(args[0]); @@ -67,10 +68,12 @@ private void collect(final Object target) { return; } + // 주어진 타겟이 리스트일 경우 if (isListType(target)) { List objects = (List) target; objects.forEach(object -> { + // Mapper에 등록된 클래스 타입인 경우 if (collectByTypeMapper.containsKey(object.getClass())) { collectByTypeMapper.get(object.getClass()) .apply(object); @@ -80,6 +83,7 @@ private void collect(final Object target) { return; } + // Mapper에 등록된 클래스 타입인 경우 if (collectByTypeMapper.containsKey(target.getClass())) { collectByTypeMapper.get(target.getClass()).apply(target); }