diff --git a/src/main/java/fun/bb1/toml/TomlArray.java b/src/main/java/fun/bb1/toml/TomlArray.java index 36e3ab4..2382dc8 100644 --- a/src/main/java/fun/bb1/toml/TomlArray.java +++ b/src/main/java/fun/bb1/toml/TomlArray.java @@ -50,7 +50,7 @@ public final class TomlArray implements ITomlElement, Iterable { @Override public String toString() { - return "TomlArray{elementList=[" + String.join(",", this.elementList.stream().map(ITomlElement::toString).collect(LinkedList::new, LinkedList::add, LinkedList::addAll)) + "]}"; + return "TomlArray{elementList=[" + this.elementList.stream().map(ITomlElement::toString).collect(StringBuilder::new, (sb,e)->sb.append(e.toString()).append(','), StringBuilder::append) + "]}"; } @Override