public static List<String> parseCsvList(String csvList) {
        if (csvList == null || csvList.isEmpty()) {
            return Collections.emptyList();
        } else {
            return Stream.of(csvList.split("\\s*,\\s*")).filter(v -> !v.isEmpty()).collect(Collectors.toList());
        }
    }
Parse a comma separated string into a sequence of strings.
Whitespace surrounding the comma will be removed.
server-common/src/main/java/org/apache/kafka/server/util/Csv.java