[jOOQ/jOOQ#11139] ParseWithMetaLookups propagates wrong type from derived table

This commit is contained in:
Lukas Eder 2020-12-17 11:12:05 +01:00
parent d0d6afc88a
commit 6f64c4a3a2
2 changed files with 4 additions and 10 deletions

View File

@ -81,9 +81,7 @@ final class FieldProxy<T> extends AbstractField<T> implements TableField<Record,
void delegate(AbstractField<T> newDelegate) {
this.delegate = newDelegate;
// [#8278] Prevent StackOverflowErrors when the data type proxy is shared
if (!(newDelegate.getDataType() instanceof DataTypeProxy))
((DataTypeProxy<T>) getDataType()).type((AbstractDataType<T>) newDelegate.getDataType());
((DataTypeProxy<T>) getDataType()).type((AbstractDataType<T>) newDelegate.getDataType());
}
@Override

View File

@ -118,14 +118,10 @@ final class ScopeStack<K, V> implements Iterable<V> {
}
private V move() {
while (it.hasNext()) {
List<V> list = it.next();
if (!list.isEmpty()) {
next = list.get(list.size() - 1);
List<V> list;
while (it.hasNext())
if (!(list = it.next()).isEmpty() && (next = list.get(list.size() - 1)) != null)
break;
}
}
return next;
}