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:22 UTC
[camel] 04/06: (chores) camel-azure-servicebus: 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 05a92a27f3a6505c6ab170e45b8b9c55f28f5777
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri May 19 14:49:26 2023 +0200
(chores) camel-azure-servicebus: use unmodifiable list when possible
---
.../apache/camel/component/azure/servicebus/ServiceBusProducer.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/components/camel-azure/camel-azure-servicebus/src/main/java/org/apache/camel/component/azure/servicebus/ServiceBusProducer.java b/components/camel-azure/camel-azure-servicebus/src/main/java/org/apache/camel/component/azure/servicebus/ServiceBusProducer.java
index a407fed149a..5f72f3dd340 100644
--- a/components/camel-azure/camel-azure-servicebus/src/main/java/org/apache/camel/component/azure/servicebus/ServiceBusProducer.java
+++ b/components/camel-azure/camel-azure-servicebus/src/main/java/org/apache/camel/component/azure/servicebus/ServiceBusProducer.java
@@ -21,7 +21,6 @@ import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
-import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
import com.azure.messaging.servicebus.ServiceBusSenderAsyncClient;
@@ -193,7 +192,7 @@ public class ServiceBusProducer extends DefaultAsyncProducer {
private List<String> convertBodyToList(final Iterable<Object> inputBody) {
return StreamSupport.stream(inputBody.spliterator(), false)
.map(body -> getEndpoint().getCamelContext().getTypeConverter().convertTo(String.class, body))
- .collect(Collectors.toList());
+ .toList();
}
private <T> void subscribeToMono(