Skip to content

Commit db758ff

Browse files
committed
FIX: InMemoryRepository.tables() returned a live set of the tables tracked by InMemoryRepository
...and `YdbRepository` returned a copy. Thus the set returned by `YdbRepository.tables()` would remain unchanged after calling `YdbRepository.dropDb()` but the set returned by `InMemoryRepository.tables()` would become empty. This PR fixes the discrepancy.
1 parent 7140604 commit db758ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

repository-inmemory/src/main/java/tech/ydb/yoj/repository/test/inmemory/InMemoryRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void loadSnapshot(String id) {
3939

4040
@Override
4141
public Set<Class<? extends Entity<?>>> tables() {
42-
return storage.tables();
42+
return Set.copyOf(storage.tables());
4343
}
4444

4545
@Override

0 commit comments

Comments
 (0)