Fixed NPE in unit tests. Still need to work out how/when this was introduced.

This commit is contained in:
CalDescent 2022-12-18 18:33:51 +00:00
parent cf3195cb83
commit e678ea22e0

View File

@ -120,7 +120,9 @@ public class Common {
}
public static void useSettingsAndDb(String settingsFilename, boolean dbInMemory) throws DataException {
closeRepository();
if (RepositoryManager.getRepositoryFactory() != null) {
closeRepository();
}
// Load/check settings, which potentially sets up blockchain config, etc.
LOGGER.debug(String.format("Using setting file: %s", settingsFilename));