Skip to content

Commit

Permalink
refactor: isNull() 사용 및 불필요한 개행 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
amaran-th committed Sep 8, 2023
1 parent 7a5b91b commit 699ecf2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package wooteco.prolog.roadmap.application;

import static java.util.Objects.isNull;
import static wooteco.prolog.common.exception.BadRequestCode.ROADMAP_KEYWORD_ORDER_EXCEPTION;
import static wooteco.prolog.common.exception.BadRequestCode.ROADMAP_QUIZ_NOT_FOUND_EXCEPTION;

Expand Down Expand Up @@ -44,11 +45,10 @@ public QuizzesResponse findQuizzesByKeywordId(Long keywordId, Long memberId) {
}

private boolean isLearning(Long memberId, Long quizId) {
if (memberId == null) {
if (isNull(memberId)) {
return false;
}
return essayAnswerRepository.existsByQuizIdAndMemberId(quizId,
memberId);
return essayAnswerRepository.existsByQuizIdAndMemberId(quizId, memberId);
}

@Transactional
Expand Down

0 comments on commit 699ecf2

Please sign in to comment.