Skip to content

Commit

Permalink
add whitespace in String.split() instead of using replceAll() to remo…
Browse files Browse the repository at this point in the history
…ve whitespace

Signed-off-by: Tianli Feng <ftianli@amazon.com>
  • Loading branch information
Tianli Feng committed Jun 5, 2022
1 parent 7dd9ea4 commit c6cfb2a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down

0 comments on commit c6cfb2a

Please sign in to comment.