Skip to content

Commit

Permalink
Fix NPE (#32234)
Browse files Browse the repository at this point in the history
  • Loading branch information
menghaoranss authored Jul 23, 2024
1 parent 5f963ef commit f66ce75
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private void addViewsToDataNode(final ShardingSphereDatabase database, final Str
if (!Strings.isNullOrEmpty(logicDataSourceName) && TableRefreshUtils.isSingleTable(entry.getKey(), database)) {
database.getRuleMetaData().getAttributes(MutableDataNodeRuleAttribute.class).forEach(each -> each.put(logicDataSourceName, schemaName, entry.getKey()));
}
database.getSchema(schemaName).putTable(entry.getKey(), toBeAddedTables.get(entry.getKey().toLowerCase()));
Optional.ofNullable(toBeAddedTables.get(entry.getKey().toLowerCase())).ifPresent(optional -> database.getSchema(schemaName).putTable(entry.getKey(), optional));
database.getSchema(schemaName).putView(entry.getKey(), entry.getValue());
}
}
Expand Down

0 comments on commit f66ce75

Please sign in to comment.