CHORE: move to StringBuilder for #toString on TomlArray

This commit is contained in:
BradBot_1 2023-06-30 03:03:58 +01:00
parent c0352181e1
commit 48daa2bf0d

View file

@ -50,7 +50,7 @@ public final class TomlArray implements ITomlElement, Iterable<ITomlElement> {
@Override @Override
public String toString() { 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 @Override