Fix toString.

This commit is contained in:
Michael Lipp 2024-11-29 14:17:13 +01:00
parent e839f7b3b2
commit 77cfcff2ed

View file

@ -93,9 +93,8 @@ public class VmPool {
if (vms.size() <= 3) { if (vms.size() <= 3) {
builder.append(vms); builder.append(vms);
} else { } else {
builder.append('['); builder.append('[').append(vms.stream().limit(3).map(s -> s + ",")
vms.stream().limit(3).map(s -> s + ",").forEach(builder::append); .collect(Collectors.joining())).append("...]");
builder.append("...]");
} }
builder.append(']'); builder.append(']');
return builder.toString(); return builder.toString();