davsclaus commented on code in PR #27370:
URL: https://github.com/apache/camel/pull/27370#discussion_r4184400407


##########
core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelPostProcessorHelper.java:
##########
@@ -348,7 +348,7 @@ private static Map<String, Object> convertMapUsingSeparator(
             }
         }
         Map<String, Object> values = new LinkedHashMap<>();
-        String[] arr = value.split(separator);
+        String[] arr = value.split(java.util.regex.Pattern.quote(separator));

Review Comment:
   Please import `java.util.regex.Pattern` instead of using the fully qualified 
name.
   
   ```suggestion
           String[] arr = value.split(Pattern.quote(separator));
   ```



##########
core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelPostProcessorHelper.java:
##########
@@ -375,7 +375,7 @@ private static Collection<?> 
convertCollectionUsingSeparator(
         }
         boolean set = type.isAssignableFrom(Set.class);
         Collection<Object> values = set ? new LinkedHashSet<>() : new 
ArrayList<>();
-        String[] arr = value.split(separator);
+        String[] arr = value.split(java.util.regex.Pattern.quote(separator));

Review Comment:
   Please import `java.util.regex.Pattern` instead of using the fully qualified 
name.
   
   ```suggestion
           String[] arr = value.split(Pattern.quote(separator));
   ```



##########
core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelPostProcessorHelper.java:
##########
@@ -385,7 +385,7 @@ private static Collection<?> 
convertCollectionUsingSeparator(
 
     private static Object[] convertArrayUsingSeparator(CamelContext 
camelContext, Class<?> type, String value, String separator)
             throws NoTypeConversionAvailableException {
-        String[] arr = value.split(separator);
+        String[] arr = value.split(java.util.regex.Pattern.quote(separator));

Review Comment:
   Please import `java.util.regex.Pattern` instead of using the fully qualified 
name.
   
   ```suggestion
           String[] arr = value.split(Pattern.quote(separator));
   ```



-- 
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