DBZ-8032 Use better exception than NullPointerException
This commit is contained in:
parent
c4fc9123b2
commit
7423ee0294
@ -434,7 +434,13 @@ protected void createSchemaChangeEventsForTables(ChangeEventSourceContext source
|
|||||||
lastSnapshotRecord(snapshotContext);
|
lastSnapshotRecord(snapshotContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
SchemaChangeEvent event = getCreateTableEvent(snapshotContext, snapshotContext.tables.forTable(tableId));
|
final Table table = snapshotContext.tables.forTable(tableId);
|
||||||
|
if (table == null) {
|
||||||
|
throw new DebeziumException("Unable to find relational table model for '" + tableId +
|
||||||
|
"', there may be an issue with your include/exclude list configuration.");
|
||||||
|
}
|
||||||
|
|
||||||
|
SchemaChangeEvent event = getCreateTableEvent(snapshotContext, table);
|
||||||
if (HistorizedRelationalDatabaseSchema.class.isAssignableFrom(schema.getClass()) &&
|
if (HistorizedRelationalDatabaseSchema.class.isAssignableFrom(schema.getClass()) &&
|
||||||
((HistorizedRelationalDatabaseSchema) schema).skipSchemaChangeEvent(event)) {
|
((HistorizedRelationalDatabaseSchema) schema).skipSchemaChangeEvent(event)) {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user