From 2cd1145a79054a9d07fd6eac488a84d560561026 Mon Sep 17 00:00:00 2001 From: eun-seong Date: Thu, 7 Mar 2024 02:17:49 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Map=20value=EC=97=90=20=ED=95=AD?= =?UTF-8?q?=EC=83=81=20=EC=83=88=EB=A1=9C=EC=9A=B4=20List=20=EB=93=A4?= =?UTF-8?q?=EC=96=B4=EA=B0=80=EB=8D=98=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95(#104)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/dnd/namuiwiki/domain/dashboard/model/Statistics.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/dnd/namuiwiki/domain/dashboard/model/Statistics.java b/src/main/java/com/dnd/namuiwiki/domain/dashboard/model/Statistics.java index 1b14c37..b0372bc 100644 --- a/src/main/java/com/dnd/namuiwiki/domain/dashboard/model/Statistics.java +++ b/src/main/java/com/dnd/namuiwiki/domain/dashboard/model/Statistics.java @@ -7,6 +7,7 @@ import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -47,8 +48,8 @@ public Map> mapStatisticsByDashboardType() { Map> statistics = new HashMap<>(); this.statistics.values().forEach(statistic -> { DashboardType dashboardType = statistic.getDashboardType(); - statistics.putIfAbsent(dashboardType, List.of()); - statistics.put(dashboardType, List.of(statistic)); + statistics.putIfAbsent(dashboardType, new ArrayList<>()); + statistics.get(dashboardType).add(statistic); }); return statistics;