diff --git a/client/sniffer/src/main/java/org/opensearch/client/sniff/OpenSearchNodesSniffer.java b/client/sniffer/src/main/java/org/opensearch/client/sniff/OpenSearchNodesSniffer.java index 36fd9e377bd04..c1a0fcf9a8acf 100644 --- a/client/sniffer/src/main/java/org/opensearch/client/sniff/OpenSearchNodesSniffer.java +++ b/client/sniffer/src/main/java/org/opensearch/client/sniff/OpenSearchNodesSniffer.java @@ -246,7 +246,7 @@ private static Node readNode(String nodeId, JsonParser parser, Scheme scheme) th if (entry.getValue().startsWith("[")) { // Convert string array to list String value = entry.getValue(); - String[] values = value.substring(1, value.length() - 1).replaceAll("\\s+", "").split(","); + String[] values = value.substring(1, value.length() - 1).split(", "); realAttributes.put(entry.getKey(), unmodifiableList(Arrays.asList(values))); } else { realAttributes.put(entry.getKey(), singletonList(entry.getValue()));