diff --git a/boot-mongodb-elasticsearch/src/test/java/com/example/mongoes/elasticsearch/repository/RestaurantESRepositoryIntegrationTest.java b/boot-mongodb-elasticsearch/src/test/java/com/example/mongoes/elasticsearch/repository/RestaurantESRepositoryIntegrationTest.java index 8013d2999..83cda7ddd 100644 --- a/boot-mongodb-elasticsearch/src/test/java/com/example/mongoes/elasticsearch/repository/RestaurantESRepositoryIntegrationTest.java +++ b/boot-mongodb-elasticsearch/src/test/java/com/example/mongoes/elasticsearch/repository/RestaurantESRepositoryIntegrationTest.java @@ -278,8 +278,8 @@ void testWildcardSearch() { StepVerifier.create(wildcardSearchMono) .consumeNextWith( searchPage -> { - assertThat(searchPage.getNumberOfElements()).isEqualTo(0); - assertThat(searchPage.getTotalPages()).isEqualTo(0); + assertThat(searchPage.getNumberOfElements()).isZero(); + assertThat(searchPage.getTotalPages()).isZero(); assertThat(searchPage.isFirst()).isTrue(); assertThat(searchPage.isLast()).isTrue(); assertThat(searchPage.isEmpty()).isTrue(); diff --git a/jpa/boot-read-replica-postgresql/src/main/java/com/example/demo/readreplica/service/ArticleService.java b/jpa/boot-read-replica-postgresql/src/main/java/com/example/demo/readreplica/service/ArticleService.java index 70aadfeb8..921843732 100644 --- a/jpa/boot-read-replica-postgresql/src/main/java/com/example/demo/readreplica/service/ArticleService.java +++ b/jpa/boot-read-replica-postgresql/src/main/java/com/example/demo/readreplica/service/ArticleService.java @@ -7,7 +7,6 @@ import com.example.demo.readreplica.repository.ArticleRepository; import java.util.List; import java.util.Optional; -import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -56,6 +55,6 @@ private List convertToComment(List commentDTOs) { comment.setComment(commentDTO.comment()); return comment; }) - .collect(Collectors.toList()); + .toList(); } }