From 91bba57a303a02c50eb0059441d417a1cde67ca8 Mon Sep 17 00:00:00 2001 From: jjuny7712 Date: Sun, 29 Oct 2023 23:17:03 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=BD=94=EB=93=9C=20=EA=B0=84?= =?UTF-8?q?=EA=B2=B0=ED=95=98=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ssafy/ssafsound/domain/post/dto/GetPostElement.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/com/ssafy/ssafsound/domain/post/dto/GetPostElement.java b/src/main/java/com/ssafy/ssafsound/domain/post/dto/GetPostElement.java index e8b22c11..53ad0f1f 100644 --- a/src/main/java/com/ssafy/ssafsound/domain/post/dto/GetPostElement.java +++ b/src/main/java/com/ssafy/ssafsound/domain/post/dto/GetPostElement.java @@ -1,7 +1,6 @@ package com.ssafy.ssafsound.domain.post.dto; import com.ssafy.ssafsound.domain.board.domain.Board; -import com.ssafy.ssafsound.domain.comment.domain.Comment; import com.ssafy.ssafsound.domain.post.domain.Post; import com.ssafy.ssafsound.domain.post.domain.PostImage; import lombok.AllArgsConstructor; @@ -11,7 +10,6 @@ import java.time.LocalDateTime; import java.util.List; -import java.util.stream.Collectors; @Getter @Builder @@ -48,9 +46,7 @@ public GetPostElement(Post post) { } private int getCommentSize(Post post) { - List comments = post.getComments(); - - return (int) comments.stream() + return (int) post.getComments().stream() .filter(comment -> !comment.getDeletedComment()).count(); }