sanjana2505006 commented on code in PR #8271:
URL: https://github.com/apache/camel-quarkus/pull/8271#discussion_r2786515023


##########
integration-tests-jvm/opensearch/src/main/java/org/apache/camel/quarkus/component/opensearch/it/OpensearchResource.java:
##########
@@ -135,7 +134,7 @@ public Response multiGet(@PathParam("index") String index,
                 .request(MultiGetResponseItem[].class);
 
         int totalFound = Arrays.asList(responseItem).stream().map(s -> 
s.result().found())
-                .collect(Collectors.toList()).size();
+                .toList().size();

Review Comment:
   I've updated the logic to use `.count()` directly on the stream as 
suggested. This avoids the unnecessary list creation and is much cleaner. Thank 
you 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to