Skip to content

Commit

Permalink
refactor: Null 참조를 방지한다.
Browse files Browse the repository at this point in the history
  • Loading branch information
pushedrumex committed Mar 12, 2024
1 parent dda3948 commit 71adf6e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public Long getTotalNumberOfAnimals() {

@Override
public FindAnimalsResponse findAnimals(int size, long count) {
Set<Object> cachedResponses = zSetOperations.range(ANIMAL_ZSET_KEY, 0, size - 1L);
Set<Object> cachedResponses = requireNonNull(
zSetOperations.range(ANIMAL_ZSET_KEY, 0, size - 1L));
PageInfo pageInfo = PageInfo.of(count, count > size);

if (cachedResponses.size() == size) {
Expand Down

0 comments on commit 71adf6e

Please sign in to comment.