Skip to content

Commit

Permalink
Changed setGetTableFunction() to be a noop if tables is already set.
Browse files Browse the repository at this point in the history
  • Loading branch information
Norman Jordan committed Jan 30, 2023
1 parent c5899db commit 9a61559
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ public void setGetTableFunction(
@NonNull final Function<String, DocumentDbSchemaTable> getTableFunction,
@NonNull final Function<Set<String>, Map<String, DocumentDbSchemaTable>> getRemainingTablesFunction)
throws IllegalStateException {
if (this.tables != null || this.tableReferences == null) {
if (this.tables != null) {
return;
} else if (this.tableReferences == null) {
throw new IllegalStateException(
SqlError.lookup(SqlError.INVALID_STATE_SET_TABLE_FUNCTION));
}
Expand Down

0 comments on commit 9a61559

Please sign in to comment.