[#1200] Internal API leak exposed through covariance in AbstractType.getFields()
This commit is contained in:
parent
6b7457536a
commit
399e5769e3
@ -444,7 +444,7 @@ implements
|
||||
}
|
||||
|
||||
context.declareFields(true);
|
||||
context.sql(getSelect());
|
||||
context.sql(getSelect1());
|
||||
context.declareFields(false);
|
||||
|
||||
// FROM and JOIN clauses
|
||||
@ -603,12 +603,16 @@ implements
|
||||
this.forUpdateWait = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final List<Field<?>> getSelect() {
|
||||
return getSelect1();
|
||||
}
|
||||
|
||||
final FieldList getSelect0() {
|
||||
return select;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final FieldList getSelect() {
|
||||
final FieldList getSelect1() {
|
||||
if (getSelect0().isEmpty()) {
|
||||
FieldList result = new SelectFieldList();
|
||||
|
||||
|
||||
@ -39,6 +39,7 @@ package org.jooq.impl;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jooq.Field;
|
||||
@ -96,7 +97,7 @@ class FieldList extends NamedQueryPartList<Field<?>> implements FieldProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final FieldList getFields() {
|
||||
public final List<Field<?>> getFields() {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@ -97,7 +97,7 @@ class TableAlias<R extends Record> extends AbstractTable<R> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public FieldList getFieldList() {
|
||||
protected FieldList getFieldList() {
|
||||
if (aliasedFields == null) {
|
||||
aliasedFields = new FieldList();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user