[jOOQ/jOOQ#12281] IllegalArgumentException: Minimum abbreviation width

is 4 when TXTFormat::minColWidth is less than 4
This commit is contained in:
Lukas Eder 2021-08-06 16:18:08 +02:00
parent 021384aac0
commit d283986fe0

View File

@ -233,7 +233,10 @@ abstract class AbstractResult<R extends Record> extends AbstractFormattable impl
else
padded = rightPad(fields.field(index).getName(), widths[index]);
writer.append(abbreviate(padded, widths[index]));
if (widths[index] < 4)
writer.append(padded);
else
writer.append(abbreviate(padded, widths[index]));
}
if (format.verticalTableBorder())
@ -294,7 +297,10 @@ abstract class AbstractResult<R extends Record> extends AbstractFormattable impl
padded = rightPad(value, widths[index]);
}
writer.append(abbreviate(padded, widths[index]));
if (widths[index] < 4)
writer.append(padded);
else
writer.append(abbreviate(padded, widths[index]));
}
if (format.verticalTableBorder())