[#5715] ArrayIndexOutOfBoundsException when fetching an unnamed column from SQL Server with plain SQL
This commit is contained in:
parent
6df93ecc58
commit
d4dde9bb40
@ -40,6 +40,8 @@
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.tools.StringUtils.defaultIfNull;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.jooq.Context;
|
||||
@ -68,7 +70,7 @@ final class QualifiedField<T> extends AbstractField<T> implements TableField<Rec
|
||||
private final Table<Record> table;
|
||||
|
||||
QualifiedField(Name name, DataType<T> type) {
|
||||
super(name.getName()[name.getName().length - 1], type);
|
||||
super(defaultIfNull(name.last(), ""), type);
|
||||
|
||||
this.name = name;
|
||||
this.table = name.getName().length > 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user