[jOOQ/jOOQ#9835] NPE when using AbstractDatabase instance without explicit configuredCustomTypes
This commit is contained in:
parent
dffa77f470
commit
84dfaa1ee2
@ -161,11 +161,11 @@ public abstract class AbstractDatabase implements Database {
|
||||
private boolean javaTimeTypes = true;
|
||||
private List<CatalogMappingType> configuredCatalogs = new ArrayList<>();
|
||||
private List<SchemaMappingType> configuredSchemata = new ArrayList<>();
|
||||
private List<CustomType> configuredCustomTypes;
|
||||
private List<EnumType> configuredEnumTypes;
|
||||
private List<ForcedType> configuredForcedTypes;
|
||||
private List<CustomType> configuredCustomTypes = new ArrayList<>();
|
||||
private List<EnumType> configuredEnumTypes = new ArrayList<>();
|
||||
private List<ForcedType> configuredForcedTypes = new ArrayList<>();
|
||||
private Set<ForcedType> unusedForcedTypes;
|
||||
private List<Embeddable> configuredEmbeddables;
|
||||
private List<Embeddable> configuredEmbeddables = new ArrayList<>();
|
||||
private SchemaVersionProvider schemaVersionProvider;
|
||||
private CatalogVersionProvider catalogVersionProvider;
|
||||
private Comparator<Definition> orderProvider;
|
||||
@ -1191,9 +1191,9 @@ public abstract class AbstractDatabase implements Database {
|
||||
|
||||
@Override
|
||||
public final String[] getSyntheticIdentities() {
|
||||
if (syntheticIdentities == null) {
|
||||
if (syntheticIdentities == null)
|
||||
syntheticIdentities = new String[0];
|
||||
}
|
||||
|
||||
return syntheticIdentities;
|
||||
}
|
||||
|
||||
@ -1204,6 +1204,9 @@ public abstract class AbstractDatabase implements Database {
|
||||
|
||||
@Override
|
||||
public final List<EnumType> getConfiguredEnumTypes() {
|
||||
if (configuredEnumTypes == null)
|
||||
configuredEnumTypes = new ArrayList<>();
|
||||
|
||||
return configuredEnumTypes;
|
||||
}
|
||||
|
||||
@ -1219,9 +1222,8 @@ public abstract class AbstractDatabase implements Database {
|
||||
@Override
|
||||
@Deprecated
|
||||
public final List<CustomType> getConfiguredCustomTypes() {
|
||||
if (configuredCustomTypes == null) {
|
||||
if (configuredCustomTypes == null)
|
||||
configuredCustomTypes = new ArrayList<>();
|
||||
}
|
||||
|
||||
return configuredCustomTypes;
|
||||
}
|
||||
@ -1234,7 +1236,7 @@ public abstract class AbstractDatabase implements Database {
|
||||
if (typeName == null)
|
||||
return null;
|
||||
|
||||
Iterator<CustomType> it1 = configuredCustomTypes.iterator();
|
||||
Iterator<CustomType> it1 = getConfiguredCustomTypes().iterator();
|
||||
|
||||
while (it1.hasNext()) {
|
||||
CustomType type = it1.next();
|
||||
@ -1649,9 +1651,9 @@ public abstract class AbstractDatabase implements Database {
|
||||
}
|
||||
|
||||
private final List<EnumDefinition> getConfiguredEnums() {
|
||||
List<EnumDefinition> result = new ArrayList<>(configuredCustomTypes.size());
|
||||
List<EnumDefinition> result = new ArrayList<>(getConfiguredEnumTypes().size());
|
||||
|
||||
for (EnumType enumType : configuredEnumTypes) {
|
||||
for (EnumType enumType : getConfiguredEnumTypes()) {
|
||||
String name = enumType.getName();
|
||||
DefaultEnumDefinition e = new DefaultEnumDefinition(getSchemata().get(0), name, null, true);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user