From 7f8e8aa9039c08860edaf3721829c791fb5c45ab Mon Sep 17 00:00:00 2001 From: Chan Jin Date: Sun, 3 Mar 2024 21:56:11 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=EC=97=90=EC=84=9C=20=EC=9A=94=EC=B2=AD?= =?UTF-8?q?=EA=B0=AF=EC=88=98=EC=99=80,=20=EC=BF=BC=EB=A6=AC=EA=B2=B0?= =?UTF-8?q?=EA=B3=BC=20=EA=B0=AF=EC=88=98=EA=B0=80=20=EA=B0=99=EC=95=84?= =?UTF-8?q?=EB=8F=84,=20hasNext=20=EC=B2=B4=ED=81=AC=EB=A5=BC=20=ED=95=B4?= =?UTF-8?q?=EC=95=BC=ED=95=9C=EB=8B=A4=20(#569)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domains/event/repository/EventCustomRepositoryImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DuDoong-Domain/src/main/java/band/gosrock/domain/domains/event/repository/EventCustomRepositoryImpl.java b/DuDoong-Domain/src/main/java/band/gosrock/domain/domains/event/repository/EventCustomRepositoryImpl.java index 96cd4b01..c96701e5 100644 --- a/DuDoong-Domain/src/main/java/band/gosrock/domain/domains/event/repository/EventCustomRepositoryImpl.java +++ b/DuDoong-Domain/src/main/java/band/gosrock/domain/domains/event/repository/EventCustomRepositoryImpl.java @@ -60,8 +60,8 @@ public Slice querySliceEventsByKeyword(String keyword, Pageable pageable) .limit(pageable.getPageSize() + 1) .fetch(); - final long remainingSize = Math.max(pageable.getPageSize() - openEvents.size(), 0); - if (remainingSize > 0) { + final long remainingSize = pageable.getPageSize() - openEvents.size(); + if (remainingSize >= 0) { openEvents.addAll(queryClosedEventsByKeywordAndSize(keyword, pageable, remainingSize)); } return SliceUtil.valueOf(openEvents, pageable);