Skip to content

Commit

Permalink
fix: class_place "null" 저장 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Soundbar91 committed Nov 28, 2024
1 parent d41fcd9 commit 3de2275
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy;
Expand Down Expand Up @@ -113,9 +114,15 @@ private String getClassTimeToString() {

private String getClassPlaceToString() {
if (classInfos != null) {
return classInfos.stream()
.map(c -> c.classPlace)
.collect(Collectors.joining(", "));
StringBuilder classPlaceSegment = new StringBuilder();
for (int i = 0; i < classInfos.size(); i++) {
if (i > 0) classPlaceSegment.append(", ");
if (Objects.equals(classInfos.get(i).classPlace,null)) {
classPlaceSegment.append("");
}
else classPlaceSegment.append(classInfos.get(i).classPlace);
}
return classPlaceSegment.toString();
}
return null;
}
Expand Down

0 comments on commit 3de2275

Please sign in to comment.