Skip to content

Commit 9a61559

Browse files
author
Norman Jordan
committed
Changed setGetTableFunction() to be a noop if tables is already set.
1 parent c5899db commit 9a61559

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/software/amazon/documentdb/jdbc/metadata/DocumentDbSchema.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ public void setGetTableFunction(
133133
@NonNull final Function<String, DocumentDbSchemaTable> getTableFunction,
134134
@NonNull final Function<Set<String>, Map<String, DocumentDbSchemaTable>> getRemainingTablesFunction)
135135
throws IllegalStateException {
136-
if (this.tables != null || this.tableReferences == null) {
136+
if (this.tables != null) {
137+
return;
138+
} else if (this.tableReferences == null) {
137139
throw new IllegalStateException(
138140
SqlError.lookup(SqlError.INVALID_STATE_SET_TABLE_FUNCTION));
139141
}

0 commit comments

Comments
 (0)