Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
[Refactor] Review Rating NPE 발생 방지 코드 추가
Browse files Browse the repository at this point in the history
`#` Rating Response에 대한 Null 케이스를 추가합니다
  • Loading branch information
happymink committed Jan 28, 2024
1 parent 3540bdc commit e21ad31
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public static APIRatingResponse convertToRatingResponse(GoogleRatingResponse goo
}

return new APIRatingResponse(
googleRatingResponse.rating(),
googleRatingResponse.reviews().size()
(googleRatingResponse.rating() == null) ? 0.0 : googleRatingResponse.rating(),
(googleRatingResponse.reviews() == null)? 0 : googleRatingResponse.reviews().size()
);
}
}

0 comments on commit e21ad31

Please sign in to comment.