Skip to content

Commit 244c5f0

Browse files
committed
Properly handle null clusterFile
1 parent 1e5552f commit 244c5f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fdb-record-layer-core/src/test/java/com/apple/foundationdb/record/test/FDBDatabaseExtension.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ public FDBDatabase getDatabase(int clusterIndex) {
154154
}
155155

156156
public FDBDatabase getDatabase(@Nullable String clusterFile) {
157-
return databases.computeIfAbsent(Objects.requireNonNullElse(clusterFile, "NULL"),
157+
return databases.computeIfAbsent(Objects.requireNonNullElse(clusterFile, ""),
158158
key -> {
159159
LOGGER.info("Connecting to cluster file: " + key);
160-
return getDatabaseFactory().getDatabase(key);
160+
return getDatabaseFactory().getDatabase(key.isEmpty() ? null : key);
161161
});
162162
}
163163

0 commit comments

Comments
 (0)