From c5ddbae99e3c14aee37182146a42c3eed12dfedc Mon Sep 17 00:00:00 2001 From: pranavt84 Date: Sat, 25 Jan 2025 18:38:49 +0530 Subject: [PATCH] KAFKA-18171:Unexpected Change in bootstrap.servers Behavior After Upgrade to 3.8.0 --- .../main/java/org/apache/kafka/common/config/ConfigDef.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java b/clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java index 970d9cebf7231..3969731425af0 100644 --- a/clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java +++ b/clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java @@ -80,7 +80,7 @@ */ public class ConfigDef { - private static final Pattern COMMA_WITH_WHITESPACE = Pattern.compile("\\s*,\\s*"); + private static final Pattern COMMA_WITH_WHITESPACE_OR_ONLY_WHITESPACE = Pattern.compile("\\s*,\\s*|\\s+"); /** * A unique Java object which represents the lack of a default value. @@ -759,7 +759,7 @@ else if (value instanceof String) if (trimmed.isEmpty()) return Collections.emptyList(); else - return Arrays.asList(COMMA_WITH_WHITESPACE.split(trimmed, -1)); + return Arrays.asList(COMMA_WITH_WHITESPACE_OR_ONLY_WHITESPACE.split(trimmed, -1)); else throw new ConfigException(name, value, "Expected a comma separated list."); case CLASS: