Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix: timetableV2 온라인 강의 응답 오류 수정 (main) #1168

Merged
merged 2 commits into from
Jan 10, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;

Expand Down Expand Up @@ -82,6 +83,10 @@ public record ClassInfo(
public static List<ClassInfo> of(String classTime, String classPlace) {
// 강의 장소가 없는 경우 강의 시간과 매핑을 못하기 때문에 바로 반환
if (classPlace == null) {
// 온라인 강의인 경우
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A

new ArrayList 선언도 생각해봤는데, 찾아보니 이 경우에는 Collections.emptyList()가 더 나은 상황인 거 같네요!

if (classTime.equals("[]")) {
return Collections.emptyList();
}
return List.of(new ClassInfo(parseClassTimes(classTime), null));
}

Expand Down
Loading