Skip to content

Commit

Permalink
refactor: book NULL 체크 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny2you committed Oct 11, 2024
1 parent b83b512 commit 1e60100
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public record BookResponse(
) {

public static BookResponse from(Book book) {
if (book == null) {
throw new IllegalArgumentException("Book 객체는 null일 수 없습니다.");
}
return BookResponse.builder()
.id(book.getId())
.title(book.getTitle())
Expand Down

0 comments on commit 1e60100

Please sign in to comment.