[jOOQ/jOOQ#12333] IndexOutOfBoundsException when calling

Result.formatChart() on an empty result
This commit is contained in:
Lukas Eder 2021-08-19 13:56:06 +02:00
parent a7dae98bac
commit 0b90e7a90f

View File

@ -872,6 +872,11 @@ abstract class AbstractResult<R extends Record> extends AbstractFormattable impl
throw new IllegalStateException();
try {
if (result.isEmpty()) {
writer.append("No data available");
return;
}
DSLContext ctx = configuration.dsl();
FormattingProvider fp = configuration.formattingProvider();
Field<?> category = fields.field(format.category());