[jOOQ/jOOQ#8669] XJC generated toString() methods produce empty list elements

This commit is contained in:
Lukas Eder 2025-03-24 15:30:11 +01:00
parent 7cf30c87dd
commit 78c096b98b

View File

@ -91,7 +91,7 @@ public final class XMLBuilder {
}
public XMLBuilder append(String wrappingElementName, String elementName, List<?> list) {
if (list != null) {
if (list != null && !list.isEmpty()) {
openTag(wrappingElementName).newLine().indent();
for (Object o : list) {
if (o instanceof XMLAppendable x)