Skip to content

Commit

Permalink
refactor: 불필요한 명시적 타입 캐스팅 제거 (#830)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangwook02 authored Dec 28, 2024
1 parent 775c1d4 commit 51632c3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.querydsl.core.types.dsl.BooleanExpression;
import com.querydsl.jpa.impl.JPAQueryFactory;
import java.util.List;
import java.util.Objects;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
Expand All @@ -15,11 +16,11 @@ public class StudyHistoryCustomRepositoryImpl implements StudyHistoryCustomRepos

@Override
public long countByStudyIdAndStudentIds(Long studyId, List<Long> studentIds) {
return (long) queryFactory
return Objects.requireNonNull(queryFactory
.select(studyHistory.count())
.from(studyHistory)
.where(eqStudyId(studyId), studyHistory.student.id.in(studentIds))
.fetchOne();
.fetchOne());
}

@Override
Expand Down

0 comments on commit 51632c3

Please sign in to comment.