You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/05/19 14:56:23 UTC
[camel] 05/06: (chores) camel-azure-storage-datalake: use unmodifiable list when possible
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 843dbab6fcb9b15eff467c0cc5d13df2b31f4667
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri May 19 14:49:40 2023 +0200
(chores) camel-azure-storage-datalake: use unmodifiable list when possible
---
.../azure/storage/datalake/client/DataLakeFileSystemClientWrapper.java | 3 +--
.../azure/storage/datalake/client/DataLakeServiceClientWrapper.java | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/components/camel-azure/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeFileSystemClientWrapper.java b/components/camel-azure/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeFileSystemClientWrapper.java
index 0eaa5309409..a77615188ce 100644
--- a/components/camel-azure/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeFileSystemClientWrapper.java
+++ b/components/camel-azure/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeFileSystemClientWrapper.java
@@ -19,7 +19,6 @@ package org.apache.camel.component.azure.storage.datalake.client;
import java.time.Duration;
import java.util.List;
import java.util.Map;
-import java.util.stream.Collectors;
import com.azure.core.http.HttpHeaders;
import com.azure.core.util.Context;
@@ -48,7 +47,7 @@ public class DataLakeFileSystemClientWrapper {
}
public List<PathItem> listPaths(final ListPathsOptions listPathsOptions, final Duration timeout) {
- return client.listPaths(listPathsOptions, timeout).stream().collect(Collectors.toList());
+ return client.listPaths(listPathsOptions, timeout).stream().toList();
}
public DataLakeDirectoryClientWrapper getDataLakeDirectoryClientWrapper(final String directoryName) {
diff --git a/components/camel-azure/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeServiceClientWrapper.java b/components/camel-azure/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeServiceClientWrapper.java
index 339ef365952..f63287edf35 100644
--- a/components/camel-azure/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeServiceClientWrapper.java
+++ b/components/camel-azure/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeServiceClientWrapper.java
@@ -18,7 +18,6 @@ package org.apache.camel.component.azure.storage.datalake.client;
import java.time.Duration;
import java.util.List;
-import java.util.stream.Collectors;
import com.azure.storage.file.datalake.DataLakeServiceClient;
import com.azure.storage.file.datalake.models.FileSystemItem;
@@ -35,7 +34,7 @@ public class DataLakeServiceClientWrapper {
}
public List<FileSystemItem> listFileSystems(final ListFileSystemsOptions options, final Duration timeout) {
- return client.listFileSystems(options, timeout).stream().collect(Collectors.toList());
+ return client.listFileSystems(options, timeout).stream().toList();
}
public DataLakeFileSystemClientWrapper getDataLakeFileSystemClientWrapper(final String fileSystemName) {