From 48daa2bf0df2120022e462e53702b78d86f806ab Mon Sep 17 00:00:00 2001 From: BradBot_1 Date: Fri, 30 Jun 2023 03:03:58 +0100 Subject: [PATCH] CHORE: move to StringBuilder for #toString on TomlArray --- src/main/java/fun/bb1/toml/TomlArray.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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