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:20 UTC

[camel] 02/06: (chores) camel-bindy: 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 4f060ba4ec84e10c498882ce2bbbad062cde223e
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri May 19 14:48:10 2023 +0200

    (chores) camel-bindy: use unmodifiable list when possible
---
 .../apache/camel/dataformat/bindy/kvp/BindyKeyValuePairDataFormat.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/kvp/BindyKeyValuePairDataFormat.java b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/kvp/BindyKeyValuePairDataFormat.java
index 58fbc24d5c2..7134290c667 100644
--- a/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/kvp/BindyKeyValuePairDataFormat.java
+++ b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/kvp/BindyKeyValuePairDataFormat.java
@@ -27,7 +27,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicInteger;
-import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
 import org.apache.camel.Exchange;
@@ -157,7 +156,7 @@ public class BindyKeyValuePairDataFormat extends BindyAbstractDataFormat {
                 // to be present when storing the actual data in the model.
                 List<String> result = Arrays.stream(line.split(separator))
                         .map(x -> x.replace("\u0085", ""))
-                        .collect(Collectors.toList());
+                        .toList();
 
                 if (result.isEmpty()) {
                     throw new IllegalArgumentException("No records have been defined in the KVP");