Skip to content

Commit

Permalink
refactor: NPE 방지 코드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangwook02 committed Oct 10, 2024
1 parent c40b53f commit bcf85b2
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public void validateUpdateRepository(
}

public void validateAppliedToStudy(Long countStudyHistory, int studentCount) {
if (countStudyHistory == null) {
throw new CustomException(STUDY_HISTORY_NOT_FOUND);
}

if (countStudyHistory != studentCount) {
throw new CustomException(STUDY_HISTORY_NOT_APPLIED_STUDENT_EXISTS);
}
Expand Down

0 comments on commit bcf85b2

Please sign in to comment.