From 8630d8221a8147d0688a32acccd84c3611c0e206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EA=B4=80=EA=B7=9C?= Date: Wed, 27 Nov 2024 14:08:18 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EB=A6=AC=EB=B7=B0=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/response/TimetableLectureResponse.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/in/koreatech/koin/domain/timetableV2/dto/response/TimetableLectureResponse.java b/src/main/java/in/koreatech/koin/domain/timetableV2/dto/response/TimetableLectureResponse.java index 55ff30a42..bfc9c46a4 100644 --- a/src/main/java/in/koreatech/koin/domain/timetableV2/dto/response/TimetableLectureResponse.java +++ b/src/main/java/in/koreatech/koin/domain/timetableV2/dto/response/TimetableLectureResponse.java @@ -91,24 +91,24 @@ public static List of(String classTime, String classPlace) { String[] classTimeSegment = classTime.substring(1, classTime.length() - 1).trim().split(",\\s*"); List classInfos = new ArrayList<>(); - List tempClassTimes = new ArrayList<>(); + List currentTimes = new ArrayList<>(); int index = 0; for (String segment : classTimeSegment) { int parseInt = Integer.parseInt(segment); if (parseInt == -1) { - if (!tempClassTimes.isEmpty()) { - classInfos.add(new ClassInfo(new ArrayList<>(tempClassTimes), classPlaceSegment[index++])); - tempClassTimes.clear(); + if (!currentTimes.isEmpty()) { + classInfos.add(new ClassInfo(new ArrayList<>(currentTimes), classPlaceSegment[index++])); + currentTimes.clear(); } } else { - tempClassTimes.add(parseInt); + currentTimes.add(parseInt); } } - if (!tempClassTimes.isEmpty()) { - classInfos.add(new ClassInfo(new ArrayList<>(tempClassTimes), classPlaceSegment[index])); + if (!currentTimes.isEmpty()) { + classInfos.add(new ClassInfo(new ArrayList<>(currentTimes), classPlaceSegment[index])); } return classInfos;