This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 898c8529ffd (chores) minor cleanups for lists (#9929)
898c8529ffd is described below

commit 898c8529ffd6560e36e21e35f556ddc23937432c
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Wed Apr 26 06:40:22 2023 +0200

    (chores) minor cleanups for lists (#9929)
    
    * (chores) camel-aws2-ddb: prefer unmutable lists when possible
    
    * (chores) camel-azure-cosmosdb: prefer unmutable lists when possible
---
 .../java/org/apache/camel/component/aws2/ddbstream/ShardTree.java     | 4 ++--
 .../camel/component/azure/cosmosdb/client/CosmosDbClientFactory.java  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/components/camel-aws/camel-aws2-ddb/src/main/java/org/apache/camel/component/aws2/ddbstream/ShardTree.java
 
b/components/camel-aws/camel-aws2-ddb/src/main/java/org/apache/camel/component/aws2/ddbstream/ShardTree.java
index 97821cc4e02..8c0d69d9e90 100644
--- 
a/components/camel-aws/camel-aws2-ddb/src/main/java/org/apache/camel/component/aws2/ddbstream/ShardTree.java
+++ 
b/components/camel-aws/camel-aws2-ddb/src/main/java/org/apache/camel/component/aws2/ddbstream/ShardTree.java
@@ -50,14 +50,14 @@ class ShardTree {
         return shards.values()
                 .stream()
                 .filter(s -> s.sequenceNumberRange().endingSequenceNumber() == 
null)
-                .collect(Collectors.toList());
+                .toList();
     }
 
     List<Shard> getChildren(String shardId) {
         return shards.values()
                 .stream()
                 .filter(s -> shardId.equals(s.parentShardId()))
-                .collect(Collectors.toList());
+                .toList();
     }
 
     @Override
diff --git 
a/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/client/CosmosDbClientFactory.java
 
b/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/client/CosmosDbClientFactory.java
index 192aea01b40..16f1d02a64a 100644
--- 
a/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/client/CosmosDbClientFactory.java
+++ 
b/components/camel-azure/camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb/client/CosmosDbClientFactory.java
@@ -53,7 +53,7 @@ public final class CosmosDbClientFactory {
         if (ObjectHelper.isNotEmpty(configuration.getPreferredRegions())) {
             
builder.preferredRegions(Stream.of(configuration.getPreferredRegions().split(","))
                     .map(String::trim)
-                    .collect(Collectors.toList()));
+                            .toList());
         }
 
         return builder;

Reply via email to