Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ public static List<String> stringToList(String value, String regex) {
Matcher matcher = LIST_STRING_REGEX.matcher(value);
if (matcher.matches()) {
value = matcher.group(1);
} else {
throw new ConfigException("", value, String.format("Invalid list string %s", value));
}
return Arrays.stream(value.split(regex)).map(String::trim).collect(toList());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public void testIdColumnsValidator() {

@Test
public void testStringToList() {
Assertions.assertEquals(List.of("a", "b", "c"), TableTopicConfigValidator.stringToList("a, b, c", COMMA_NO_PARENS_REGEX));
Assertions.assertEquals(List.of("a", "b", "c"), TableTopicConfigValidator.stringToList("[a, b, c]", COMMA_NO_PARENS_REGEX));
}
}
Loading